From 67069e1980a6847a3d5a3cf576a33c9786d92df0 Mon Sep 17 00:00:00 2001 From: Kevin Athey Date: Tue, 7 Jun 2022 17:52:03 -0700 Subject: [PATCH] [MSAN] exclude android from pthread_getaffinity_np interceptor Depends on https://reviews.llvm.org/D127185. Differential Revision: https://reviews.llvm.org/D127264 --- compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h | 2 +- .../test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index dc099d6..675e0fd 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 591602a..18db1c6 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 #include #include -- 2.7.4