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
This commit is contained in:
Dmitry Vyukov 2014-02-07 09:28:57 +00:00
parent de98fae368
commit c57987c7fb
1 changed files with 2 additions and 1 deletions

View File

@ -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) {