Skip to content

Commit 1e1cb94

Browse files
korniltsevMylesBorins
authored andcommitted
src: fix incorrect SIGSEGV handling in NODE_USE_V8_WASM_TRAP_HANDLER
Pass SA_SIGINFO to sa_flags so the TrapWebAssemblyOrContinue is treated as sa_sigaction, not sa_handler, otherwise siginfo_t* info contains some garbage PR-URL: #35282 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
1 parent 0d8eaa3 commit 1e1cb94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ inline void PlatformInit() {
644644
struct sigaction sa;
645645
memset(&sa, 0, sizeof(sa));
646646
sa.sa_sigaction = TrapWebAssemblyOrContinue;
647+
sa.sa_flags = SA_SIGINFO;
647648
CHECK_EQ(sigaction(SIGSEGV, &sa, nullptr), 0);
648649
}
649650
V8::EnableWebAssemblyTrapHandler(false);

0 commit comments

Comments
 (0)