diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-04-23 14:01:57 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-04-23 14:01:57 +0000 |
commit | f88f611450c6808f815ec12290658f74acb9d324 (patch) | |
tree | 7890c05ac32104f85d03e9acfccd1d11be7f10c9 /lib/msan/msan_thread.h | |
parent | 08e645a1ec40c7174cedff73eeac978b9c1e9fae (diff) |
[msan] Disable chained origins in signal handlers.
StackDepot is not async-signal-safe; storing a new origin to it can deadlock.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_thread.h')
-rw-r--r-- | lib/msan/msan_thread.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/msan/msan_thread.h b/lib/msan/msan_thread.h index 82ed96c0a..bc605b89a 100644 --- a/lib/msan/msan_thread.h +++ b/lib/msan/msan_thread.h @@ -38,6 +38,10 @@ class MsanThread { return addr >= stack_bottom_ && addr < stack_top_; } + bool InSignalHandler() { return in_signal_handler_; } + void EnterSignalHandler() { in_signal_handler_++; } + void LeaveSignalHandler() { in_signal_handler_--; } + MsanThreadLocalMallocStorage &malloc_storage() { return malloc_storage_; } int destructor_iterations_; @@ -54,6 +58,8 @@ class MsanThread { uptr tls_begin_; uptr tls_end_; + unsigned in_signal_handler_; + MsanThreadLocalMallocStorage malloc_storage_; }; |