diff options
author | Anatoly Korniltsev <korniltsev.anatoly@gmail.com> | 2020-09-21 17:29:19 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2020-09-26 13:30:39 +0300 |
commit | ff028016ffd1e5a157b8665c07356966c0ea9f2a (patch) | |
tree | 684beda2c6d3a2dca9d27de48c08fa6d76eb5c9f /src/node.cc | |
parent | ff38165820da2a9eaddabbce23f3e75aa502900b (diff) |
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: https://github.com/nodejs/node/pull/35282
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc index 00cce0fd465..521cae7757d 100644 --- a/src/node.cc +++ b/src/node.cc @@ -661,6 +661,7 @@ inline void PlatformInit() { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = TrapWebAssemblyOrContinue; + sa.sa_flags = SA_SIGINFO; CHECK_EQ(sigaction(SIGSEGV, &sa, nullptr), 0); } #endif // defined(_WIN32) |