[llvm-branch-commits] [compiler-rt] bdd28a2 - [sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 20 22:05:13 PST 2021
Author: Vitaly Buka
Date: 2021-12-20T22:04:17-08:00
New Revision: bdd28a2a138f0a6db356233a6fe65f49e0016769
URL: https://github.com/llvm/llvm-project/commit/bdd28a2a138f0a6db356233a6fe65f49e0016769
DIFF: https://github.com/llvm/llvm-project/commit/bdd28a2a138f0a6db356233a6fe65f49e0016769.diff
LOG: [sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
(cherry picked from commit e60b3fcefa62311a93a9f7c8589a1da5f25b1ba9)
Added:
Modified:
compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
index 610958143b472..fee88666b2ec0 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
@@ -4,7 +4,12 @@
#include <pthread.h>
-#ifdef USE_GLIBC
+#if !defined(__GLIBC_PREREQ)
+#define __GLIBC_PREREQ(a, b) 0
+#endif
+
+#if defined(USE_GLIBC) && !__GLIBC_PREREQ(2, 34)
+// They were removed from GLIBC 2.34
extern "C" int __pthread_mutex_lock(pthread_mutex_t *__mutex);
extern "C" int __pthread_mutex_unlock(pthread_mutex_t *__mutex);
#define LOCK __pthread_mutex_lock
More information about the llvm-branch-commits
mailing list