From f3ed62f626e89bfc3e803c3283016e58cde67c2c Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 31 Jul 2015 00:00:03 +0000 Subject: [PATCH] [asan] Fix signal() interception on 64-bit Android. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc index c1357f4..f842c80 100644 --- a/compiler-rt/lib/asan/asan_interceptors.cc +++ b/compiler-rt/lib/asan/asan_interceptors.cc @@ -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); -- 2.7.4