[msan] Stop calling pthread_getspecific in signal handlers.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 17 Dec 2014 10:30:06 +0000 (10:30 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 17 Dec 2014 10:30:06 +0000 (10:30 +0000)
commit372deb091ef44158d60bb4cc28f9110ab948ed2f
tree5485a8c26f2a4b92ee445e99837b409c925e3e46
parent508dd9b94c7c310a42982fae9b22fc21ebcdd482
[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.

llvm-svn: 224423
compiler-rt/lib/msan/msan_linux.cc
compiler-rt/lib/msan/msan_thread.cc