[ASan] Make blacklist test more robust

llvm-svn: 189748
This commit is contained in:
Alexey Samsonov 2013-09-02 09:17:51 +00:00
parent f9ab351b8a
commit bbd5f46696
1 changed files with 4 additions and 2 deletions

View File

@ -12,8 +12,10 @@
// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O3 %s -o %t \
// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
// badGlobal is accessed improperly, but we blacklisted it.
int badGlobal;
// badGlobal is accessed improperly, but we blacklisted it. Align
// it to make sure memory past the end of badGlobal will be in
// the same page.
__attribute__((aligned(16))) int badGlobal;
int readBadGlobal() {
return (&badGlobal)[1];
}