[compiler-rt] [tsan] Make pthread_mutex_clocklock Linux only again (PR #76187)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 13:37:18 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Dan McGregor (dankm)
<details>
<summary>Changes</summary>
In e77731722755 it seems that not every reference to pthread_mutex_clocklock was made Linux only.
Wrap the remaining references.
---
Full diff: https://github.com/llvm/llvm-project/pull/76187.diff
1 Files Affected:
- (modified) compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp (+2)
``````````diff
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index fdcba6e8ca7398..0c9f9b104055e0 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -2918,7 +2918,9 @@ void InitializeInterceptors() {
TSAN_INTERCEPT(pthread_mutex_trylock);
TSAN_INTERCEPT(pthread_mutex_timedlock);
TSAN_INTERCEPT(pthread_mutex_unlock);
+ #if SANITIZER_LINUX
TSAN_INTERCEPT(pthread_mutex_clocklock);
+ #endif
#if SANITIZER_GLIBC
# if !__GLIBC_PREREQ(2, 34)
TSAN_INTERCEPT(__pthread_mutex_lock);
``````````
</details>
https://github.com/llvm/llvm-project/pull/76187
More information about the llvm-commits
mailing list