diff options
| author | Kuba Mracek <mracek@apple.com> | 2016-11-26 01:30:31 +0000 |
|---|---|---|
| committer | Kuba Mracek <mracek@apple.com> | 2016-11-26 01:30:31 +0000 |
| commit | 23551fa811fbb27cf9bb87cb8105807ad3cf23a5 (patch) | |
| tree | ec215f823efc1d575cfd7aa66d986acf65113d37 | |
| parent | 656c1fa54468b0c0e0dd86b844c99055fba627c9 (diff) | |
| download | bcm5719-llvm-23551fa811fbb27cf9bb87cb8105807ad3cf23a5.tar.gz bcm5719-llvm-23551fa811fbb27cf9bb87cb8105807ad3cf23a5.zip | |
[asan] Support handle_sigill on Darwin
Handling SIGILL on Darwin works fine, so let's just make this feature work and re-enable the ill.cc testcase.
Differential Revision: https://reviews.llvm.org/D27141
llvm-svn: 287959
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_mac.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/test/asan/TestCases/ill.cc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc index 3c1f2169af5..cf9465b33f7 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc @@ -400,6 +400,8 @@ bool IsHandledDeadlySignal(int signum) { return false; if (common_flags()->handle_abort && signum == SIGABRT) return true; + if (common_flags()->handle_sigill && signum == SIGILL) + return true; return (signum == SIGSEGV || signum == SIGBUS) && common_flags()->handle_segv; } diff --git a/compiler-rt/test/asan/TestCases/ill.cc b/compiler-rt/test/asan/TestCases/ill.cc index 887f506ddc0..d7b53509167 100644 --- a/compiler-rt/test/asan/TestCases/ill.cc +++ b/compiler-rt/test/asan/TestCases/ill.cc @@ -3,7 +3,6 @@ // RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 // RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 // REQUIRES: x86-target-arch -// UNSUPPORTED: darwin #ifdef _WIN32 #include <windows.h> |

