diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2015-03-02 17:36:02 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2015-03-02 17:36:02 +0000 |
commit | 9b281a9fd41a8a09ff6c9c1bf4cc13c1362533c8 (patch) | |
tree | 5964bb033a45d1b6b4738b9ca4f907328a3b5070 /lib/tsan/rtl/tsan_rtl.h | |
parent | c1b43b1d4c26fabc2199640c9bcc613a8cbc1e6e (diff) |
asan: fix signal handling during stoptheworld
The problem is that without SA_RESTORER flag, kernel ignores the handler. So tracer actually did not setup any handler.
Add SA_RESTORER flag when setting up handlers.
Add a test that causes SIGSEGV in stoptheworld callback.
Move SignalContext from asan to sanitizer_common to print better diagnostics about signal in the tracer thread.
http://reviews.llvm.org/D8005
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl.h')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tsan/rtl/tsan_rtl.h b/lib/tsan/rtl/tsan_rtl.h index 7a60e5c55..7b72922ed 100644 --- a/lib/tsan/rtl/tsan_rtl.h +++ b/lib/tsan/rtl/tsan_rtl.h @@ -313,7 +313,7 @@ class Shadow : public FastState { } }; -struct SignalContext; +struct ThreadSignalContext; struct JmpBuf { uptr sp; @@ -387,7 +387,7 @@ struct ThreadState { DDLogicalThread *dd_lt; atomic_uintptr_t in_signal_handler; - SignalContext *signal_ctx; + ThreadSignalContext *signal_ctx; DenseSlabAllocCache block_cache; DenseSlabAllocCache sync_cache; |