[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: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#75680}
This commit is contained in:
parent
a079f05798
commit
9e6fcf1d06
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user