summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.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-23 15:57:58 -0700
commit3093e71811ee91273e629a4702abe823329ef3c6 (patch)
treecc7b7ea9b739f219e6c5a63065b9e15058078819 /libc/malloc_hooks/malloc_hooks.cpp
parentc33ad202589c37be588206122743a9a755214b53 (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
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions