[asan] Fix signal() interception on 64-bit Android.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 31 Jul 2015 00:00:03 +0000 (00:00 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 31 Jul 2015 00:00:03 +0000 (00:00 +0000)
The bsd_signal() special case only applies to 32-bit Android targets.
Fixes AddressSanitizer.SignalTest on aarch64/android.

llvm-svn: 243714

compiler-rt/lib/asan/asan_interceptors.cc

index c1357f4..f842c80 100644 (file)
@@ -263,7 +263,7 @@ DEFINE_REAL_PTHREAD_FUNCTIONS
 
 #if ASAN_INTERCEPT_SIGNAL_AND_SIGACTION
 
-#if SANITIZER_ANDROID
+#if SANITIZER_ANDROID && !defined(_LP64)
 INTERCEPTOR(void*, bsd_signal, int signum, void *handler) {
   if (!IsDeadlySignal(signum) || common_flags()->allow_user_segv_handler) {
     return REAL(bsd_signal)(signum, handler);
@@ -769,7 +769,7 @@ void InitializeAsanInterceptors() {
   ASAN_INTERCEPT_FUNC(longjmp);
 #if ASAN_INTERCEPT_SIGNAL_AND_SIGACTION
   ASAN_INTERCEPT_FUNC(sigaction);
-#if SANITIZER_ANDROID
+#if SANITIZER_ANDROID && !defined(_LP64)
   ASAN_INTERCEPT_FUNC(bsd_signal);
 #else
   ASAN_INTERCEPT_FUNC(signal);