[compiler-rt] f69c836 - [asan] Disable qsort interceptor on Android.

Evgenii Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 18:28:44 PST 2020


Author: Evgenii Stepanov
Date: 2020-02-10T18:26:18-08:00
New Revision: f69c83645b81ffbffbce5abfe827f8ff1a965d9f

URL: https://github.com/llvm/llvm-project/commit/f69c83645b81ffbffbce5abfe827f8ff1a965d9f
DIFF: https://github.com/llvm/llvm-project/commit/f69c83645b81ffbffbce5abfe827f8ff1a965d9f.diff

LOG: [asan] Disable qsort interceptor on Android.

The interceptor uses thread-local variables, which (until very recently)
are emu-tls. An access to such variable may call malloc which can
deadlock the runtime library.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 1bc128fb05f0..8d08c0de1770 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -594,7 +594,7 @@
 #define SANITIZER_INTERCEPT_PTHREAD_ATFORK SI_NETBSD
 #define SANITIZER_INTERCEPT_GETENTROPY SI_FREEBSD
 #define SANITIZER_INTERCEPT_QSORT \
-  (SI_POSIX && !SI_IOSSIM && !SI_WATCHOS && !SI_TVOS)
+  (SI_POSIX && !SI_IOSSIM && !SI_WATCHOS && !SI_TVOS && !SI_ANDROID)
 #define SANITIZER_INTERCEPT_QSORT_R (SI_LINUX && !SI_ANDROID)
 #define SANITIZER_INTERCEPT_SIGALTSTACK SI_POSIX
 


        


More information about the llvm-commits mailing list