[compiler-rt] 5ec8322 - tsan: turn off COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED

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


Author: Dmitry Vyukov
Date: 2021-10-26T16:13:03+02:00
New Revision: 5ec832269eedeeddcf00d34efd7272a107e2c7c1

URL: https://github.com/llvm/llvm-project/commit/5ec832269eedeeddcf00d34efd7272a107e2c7c1
DIFF: https://github.com/llvm/llvm-project/commit/5ec832269eedeeddcf00d34efd7272a107e2c7c1.diff

LOG: tsan: turn off COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED

All tsan interceptors check for initialization and/or initialize things
as necessary lazily, so we can pretend everything is initialized in the
COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED check to avoid double-checking
for initialization (this is only necessary for sanitizers that don't
handle initialization on common grounds).

Reviewed By: melver

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

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 617eda650317..181a85001c7c 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -152,8 +152,11 @@ const int SA_SIGINFO = 4;
 const int SIG_SETMASK = 2;
 #endif
 
-#define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED \
-  (!cur_thread_init()->is_inited)
+// 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
 
 namespace __tsan {
 struct SignalDesc {


        


More information about the llvm-commits mailing list