From c57987c7fb0d3499337311bae4084fd94c371e43 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 7 Feb 2014 09:28:57 +0000 Subject: [PATCH] tsan: run user OnInitialize callback later when global and thread state are initialized, this allows to do more things in the callback. llvm-svn: 200966 --- compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index 04498aa6278c..d871fb4cb19d 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -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) {