[compiler-rt] 65e795c - Revert "tsan: turn off COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED"

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 10:53:13 PDT 2021


Author: Dmitry Vyukov
Date: 2021-10-26T19:53:07+02:00
New Revision: 65e795c9cad8e65756bb78913447fef8a3d03d38

URL: https://github.com/llvm/llvm-project/commit/65e795c9cad8e65756bb78913447fef8a3d03d38
DIFF: https://github.com/llvm/llvm-project/commit/65e795c9cad8e65756bb78913447fef8a3d03d38.diff

LOG: Revert "tsan: turn off COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED"

This reverts commit 5ec832269eedeeddcf00d34efd7272a107e2c7c1.

It broke a number of bots, e.g.:
https://lab.llvm.org/buildbot/#/builders/52/builds/11811

Reviewed By: melver

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

Added: 
    

Modified: 
    compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index 181a85001c7c8..617eda6503175 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -152,11 +152,8 @@ const int SA_SIGINFO = 4;
 const int SIG_SETMASK = 2;
 #endif
 
-// All tsan interceptors check for initialization and/or initialize things
-// as necessary lazily, so we can pretend everything is initialized in this
-// check to avoid double-checking for initialization (this is only necessary for
-// sanitizers that don't handle initialization on common grounds).
-#define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED false
+#define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED \
+  (!cur_thread_init()->is_inited)
 
 namespace __tsan {
 struct SignalDesc {


        


More information about the llvm-commits mailing list