From 1c1cd425b9fed0590bdaf3bae08672f04e01bfa5 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 17 Dec 2014 10:30:06 +0000 Subject: [msan] Stop calling pthread_getspecific in signal handlers. pthread_getspecific is not async-signal-safe. MsanThread pointer is now stored in a TLS variable, and the TSD slot is used only for its destructor, and never from a signal handler. This should fix intermittent CHECK failures in MsanTSDSet. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224423 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/msan_thread.cc | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib/msan/msan_thread.cc') diff --git a/lib/msan/msan_thread.cc b/lib/msan/msan_thread.cc index f29a4b053..e15a247c6 100644 --- a/lib/msan/msan_thread.cc +++ b/lib/msan/msan_thread.cc @@ -79,15 +79,4 @@ thread_return_t MsanThread::ThreadStart() { return res; } -MsanThread *GetCurrentThread() { - return reinterpret_cast(MsanTSDGet()); -} - -void SetCurrentThread(MsanThread *t) { - // Make sure we do not reset the current MsanThread. - CHECK_EQ(0, MsanTSDGet()); - MsanTSDSet(t); - CHECK_EQ(t, MsanTSDGet()); -} - } // namespace __msan -- cgit v1.2.3