[compiler-rt] 8aabde5 - [NFC][sanitizer] Check &real_pthread_join
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 23:59:41 PST 2021
Author: Vitaly Buka
Date: 2021-12-01T23:59:33-08:00
New Revision: 8aabde5a4b4872767dbd75e517f1a93adf097bc0
URL: https://github.com/llvm/llvm-project/commit/8aabde5a4b4872767dbd75e517f1a93adf097bc0
DIFF: https://github.com/llvm/llvm-project/commit/8aabde5a4b4872767dbd75e517f1a93adf097bc0.diff
LOG: [NFC][sanitizer] Check &real_pthread_join
It's a weak function which may be undefined.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index ad70d8f1a3f98..2d787332a445a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -1770,7 +1770,8 @@ void *internal_start_thread(void *(*func)(void *arg), void *arg) {
}
void internal_join_thread(void *th) {
- real_pthread_join(th, nullptr);
+ if (&real_pthread_join)
+ real_pthread_join(th, nullptr);
}
#else
void *internal_start_thread(void *(*func)(void *), void *arg) { return 0; }
More information about the llvm-commits
mailing list