Commit 9e6fcf1d authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[trap-handler] Unmask the right signal

When porting to MacOS (in https://crrev.com/c/1282960), we forgot to
update signal masking to unmask SIGBUS instead of SIGSEGV.

R=mseaborn@chromium.org, ahaas@chromium.org

Bug: chromium:906565
Change-Id: I486a204f33139f1da4a074a07878921692b713e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3015565
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75680}
parent a079f057
......@@ -102,7 +102,7 @@ bool TryHandleSignal(int signum, siginfo_t* info, void* context) {
// Fortunately, sigemptyset and sigaddset are async-signal-safe according to
// the POSIX standard.
sigemptyset(&sigs);
sigaddset(&sigs, SIGSEGV);
sigaddset(&sigs, kOobSignal);
SigUnmaskStack unmask(sigs);
ucontext_t* uc = reinterpret_cast<ucontext_t*>(context);
......@@ -137,9 +137,9 @@ bool TryHandleSignal(int signum, siginfo_t* info, void* context) {
void HandleSignal(int signum, siginfo_t* info, void* context) {
if (!TryHandleSignal(signum, info, context)) {
// Since V8 didn't handle this signal, we want to re-raise the same signal.
// For kernel-generated SEGV signals, we do this by restoring the original
// SEGV handler and then returning. The fault will happen again and the
// usual SEGV handling will happen.
// For kernel-generated signals, we do this by restoring the original
// handler and then returning. The fault will happen again and the usual
// signal handling will happen.
//
// We handle user-generated signals by calling raise() instead. This is for
// completeness. We should never actually see one of these, but just in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment