diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2018-07-10 19:34:46 +0000 |
---|---|---|
committer | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2018-07-10 19:34:46 +0000 |
commit | 1303b7bd0479ee64e9fa57ee146e73d7bdb8045a (patch) | |
tree | 36864331139efcac8ee2472c4e25a118dd6d2986 /test/asan/TestCases | |
parent | 9777fa5926b7e85b1d728000efe9157dab350d1f (diff) | |
download | compiler-rt-1303b7bd0479ee64e9fa57ee146e73d7bdb8045a.tar.gz |
Limit ASan non-executable-pc test case to x86 bots
The test case fails on the big-endian PPC bot, probably because PowerPC
uses function descriptors. More over other architectures don't support
NX mappings. (This test case was not being exercised prior to r336633.)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases')
-rw-r--r-- | test/asan/TestCases/non-executable-pc.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/asan/TestCases/non-executable-pc.cpp b/test/asan/TestCases/non-executable-pc.cpp index 6412916e7..60e900b87 100644 --- a/test/asan/TestCases/non-executable-pc.cpp +++ b/test/asan/TestCases/non-executable-pc.cpp @@ -3,10 +3,10 @@ // RUN: not %run %t n 2>&1 | FileCheck %s -check-prefix=CHECK -check-prefix=NON_EXEC // Not every OS lists every memory region in MemoryMappingLayout. -// REQUIRES: linux || freebsd || netbsd - -// We don't have non-execute protection on s390 processors before z14. -// UNSUPPORTED: s390 +// This is limited to x86_64 because some architectures (e.g. the s390 before +// the z14) don't support NX mappings and others like PowerPC use function +// descriptors. +// REQUIRES: x86-target-arch && (linux || freebsd || netbsd) #include <assert.h> @@ -23,12 +23,6 @@ int main(int argc, char **argv) { } func(); - // x86 reports the SEGV with both address=X and pc=X. - // On PowerPC64 ELFv1, the pointer is taken to be a function-descriptor - // pointer out of which three 64-bit quantities are read. This will SEGV, but - // the compiler is free to choose the order. As a result, the address is - // either X, X+0x8 or X+0x10. The pc is still in main() because it has not - // actually made the call when the faulting access occurs. // CHECK: DEADLYSIGNAL // CHECK: {{AddressSanitizer: (SEGV|access-violation).*(address|pc) }} // NON_EXEC: PC is at a non-executable region. Maybe a wild jump? |