Skip to content

Commit ff02801

Browse files
korniltsevnodejs-github-bot
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 <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
1 parent ff38165 commit ff02801

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node.cc

+1
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)