[compiler-rt] r287959 - [asan] Support handle_sigill on Darwin
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 17:30:31 PST 2016
Author: kuba.brecka
Date: Fri Nov 25 19:30:31 2016
New Revision: 287959
URL: http://llvm.org/viewvc/llvm-project?rev=287959&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
compiler-rt/trunk/test/asan/TestCases/ill.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=287959&r1=287958&r2=287959&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Fri Nov 25 19:30:31 2016
@@ -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;
}
Modified: compiler-rt/trunk/test/asan/TestCases/ill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/ill.cc?rev=287959&r1=287958&r2=287959&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/ill.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/ill.cc Fri Nov 25 19:30:31 2016
@@ -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>
More information about the llvm-commits
mailing list