diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-12-17 10:30:06 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-12-17 10:30:06 +0000 |
commit | 1c1cd425b9fed0590bdaf3bae08672f04e01bfa5 (patch) | |
tree | 297afcb10ac10ebc4669636f3d1c92fb4ae778eb /lib/msan/msan_thread.cc | |
parent | 494372c77fdeb6bc4d16edc118fb6e9cc200474a (diff) |
[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
Diffstat (limited to 'lib/msan/msan_thread.cc')
-rw-r--r-- | lib/msan/msan_thread.cc | 11 |
1 files changed, 0 insertions, 11 deletions
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<MsanThread *>(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 |