From bc7dfbb3b1fe5415374023cfc17d7ff22e57d8f8 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200966 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/tsan/rtl/tsan_rtl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tsan/rtl/tsan_rtl.cc b/lib/tsan/rtl/tsan_rtl.cc index 04498aa62..d871fb4cb 100644 --- a/lib/tsan/rtl/tsan_rtl.cc +++ b/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) { -- 2.11.4.GIT