Skip to content

Commit 5b497d2

Browse files
korniltsevjoesepi
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: nodejs#35282 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
1 parent 07a8787 commit 5b497d2

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
@@ -661,6 +661,7 @@ inline void PlatformInit() {
661661
struct sigaction sa;
662662
memset(&sa, 0, sizeof(sa));
663663
sa.sa_sigaction = TrapWebAssemblyOrContinue;
664+
sa.sa_flags = SA_SIGINFO;
664665
CHECK_EQ(sigaction(SIGSEGV, &sa, nullptr), 0);
665666
}
666667
#endif // defined(_WIN32)

0 commit comments

Comments
 (0)