[compiler-rt] 67069e1 - [MSAN] exclude android from pthread_getaffinity_np interceptor

Kevin Athey via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 17:53:38 PDT 2022


Author: Kevin Athey
Date: 2022-06-07T17:53:32-07:00
New Revision: 67069e1980a6847a3d5a3cf576a33c9786d92df0

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

LOG: [MSAN] exclude android from pthread_getaffinity_np interceptor

Depends on https://reviews.llvm.org/D127185.

Differential Revision: https://reviews.llvm.org/D127264

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
    compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index dc099d6cd2571..675e0fdbc7b4a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -348,7 +348,7 @@
 #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETINHERITSCHED \
   (SI_FREEBSD || SI_NETBSD || SI_MAC || SI_LINUX_NOT_ANDROID || SI_SOLARIS)
 #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETAFFINITY_NP SI_GLIBC
-#define SANITIZER_INTERCEPT_PTHREAD_GETAFFINITY_NP SI_LINUX
+#define SANITIZER_INTERCEPT_PTHREAD_GETAFFINITY_NP SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET_SCHED SI_POSIX
 #define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETPSHARED \
   (SI_POSIX && !SI_NETBSD)

diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp
index 591602aeaec65..18db1c6a12199 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp
@@ -1,5 +1,7 @@
 // RUN: %clangxx -O0 %s -o %t && %run %t
 
+// UNSUPPORTED: android
+
 #include <assert.h>
 #include <pthread.h>
 #include <sys/sysinfo.h>


        


More information about the llvm-commits mailing list