Posix StackDumpSignalHandler should re-raise signal
In-process stack dumping has caused problems on Posix platforms due to the signal handler's behavior. Historically on some platforms it has just called _exit(1) which is bad for tests that need to verify a process crashed with the correct signal (e.g. sandbox tests, crash reporter tests, assertion tests, MTE tests). More recently it has been returning from the signal handler and waiting for the crash to occur again, which may not re-raise the signal if the signal was delivered asynchronously (e.g. via kill(), or async MTE faults), or possibly due to race condition crashes. StackDumpSignalHandler() should instead just purposely re-raise the signal, very similarly to crashpad. On Linux, ChromeOS, and Android we try to use rt_tgsigqueueinfo to re-raise the signal and preserve 100% of the crashing context. On other Posix platforms (Mac) and very old, unsupported Linux kernels, we just call raise() again which will preserve most of the important context of the crashing instruction. This effectively reverts b54981c4 e5c3e3c6 Bug: 551681 Change-Id: Ice0e3f7dd6c58ef8bc15a404c5251a15fbc0c2a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602549 Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org> Cr-Commit-Position: refs/heads/main@{#1161968}
Loading
Please register or sign in to comment