[compiler-rt] r200966 - tsan: run user OnInitialize callback later

Dmitry Vyukov dvyukov at google.com
Fri Feb 7 01:28:57 PST 2014


Author: dvyukov
Date: Fri Feb  7 03:28:57 2014
New Revision: 200966

URL: http://llvm.org/viewvc/llvm-project?rev=200966&view=rev
Log:
tsan: run user OnInitialize callback later
when global and thread state are initialized,
this allows to do more things in the callback.


Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=200966&r1=200965&r2=200966&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Fri Feb  7 03:28:57 2014
@@ -241,7 +241,6 @@ void Initialize(ThreadState *thr) {
   InitializeShadowMemory();
 #endif
   InitializeFlags(&ctx->flags, env);
-  OnInitialize();
   // Setup correct file descriptor for error reports.
   __sanitizer_set_report_path(flags()->log_path);
   InitializeSuppressions();
@@ -268,6 +267,8 @@ void Initialize(ThreadState *thr) {
            (int)internal_getpid());
     while (__tsan_resumed == 0) {}
   }
+
+  OnInitialize();
 }
 
 int Finalize(ThreadState *thr) {





More information about the llvm-commits mailing list