summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/malloc_debug.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-04-23 15:53:17 -0700
committerElliott Hughes <enh@google.com>2020-04-24 08:59:35 -0700
commit95cebe5b11a92e4431304a4553d96bfb6b5365df (patch)
tree7d4c68e785cd42e5346e104ae7bd525b738cab29 /libc/malloc_debug/malloc_debug.cpp
parent76eb84a4f4f101a11d6b8553ea71152d1c9ce731 (diff)
Block all signals in ScopedSignalBlocker.
When a thread calls pthread_exit(3), ScopedSignalBlocker blocks all user-visible signals, but leaves internal-use signals 33/34/36/36/37. Signal 33 is used to unwind a thread for a backtrace, which can cause us to access the stack after it's been unmapped. (Avoiding this was the reason why we have the ScopedSignalBlocker in pthread_exit(3)!) Fix this (and other potential issues) by changing ScopedSignalBlocker to call __rt_sigprocmask(2) directly, so we don't mask out the internal-use signals. Bug: https://issuetracker.google.com/153624226 Test: not trivially reproducible Change-Id: I9b125ed41ddee4c5d33b45920f1d142e52db47cb Merged-In: I9b125ed41ddee4c5d33b45920f1d142e52db47cb
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions