From c6ac98d7fcc81768b2ef7ddc785c27e3fc1bdef6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 8 Jul 2013 12:57:24 +0000 Subject: [lsan] Handle fork() correctly. Update the main thread's os_id on every pthread_create, and before initiating leak checking. This ensures that we have the correct os_id even if we have forked after Init(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185815 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/lsan/lsan_thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/lsan/lsan_thread.h') diff --git a/lib/lsan/lsan_thread.h b/lib/lsan/lsan_thread.h index b62f04b8e..4641b32ed 100644 --- a/lib/lsan/lsan_thread.h +++ b/lib/lsan/lsan_thread.h @@ -47,7 +47,7 @@ u32 ThreadTid(uptr uid); u32 GetCurrentThread(); void SetCurrentThread(u32 tid); ThreadContext *CurrentThreadContext(); - +void EnsureMainThreadIDIsCorrect(); } // namespace __lsan #endif // LSAN_THREAD_H -- cgit v1.2.3