summaryrefslogtreecommitdiff
path: root/src/tools/wasm2c-wrapper.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-07-14 08:26:32 -0700
committerGitHub <noreply@github.com>2020-07-14 08:26:32 -0700
commit78e1e5fb58810fcf25ee9192397baa26e3ee017e (patch)
tree1c25f0c756eecc11603ebe105cb14e368d01a448 /src/tools/wasm2c-wrapper.h
parent8dc843d6e2eec2c20e34b8b97338cf35bb6a811d (diff)
downloadbinaryen-78e1e5fb58810fcf25ee9192397baa26e3ee017e.tar.gz
binaryen-78e1e5fb58810fcf25ee9192397baa26e3ee017e.tar.bz2
binaryen-78e1e5fb58810fcf25ee9192397baa26e3ee017e.zip
wasm2c signal handler fixes (#2957)
Use WASM_RT_SETJMP so we use sigsetjmp when we need to. Also disable signals in emcc+wasm2c in the fuzzer. emcc looks like unix, so it enters the ifdef to use signals, but wasm has no signals...
Diffstat (limited to 'src/tools/wasm2c-wrapper.h')
-rw-r--r--src/tools/wasm2c-wrapper.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wasm2c-wrapper.h b/src/tools/wasm2c-wrapper.h
index fb0658ef0..55eed0c35 100644
--- a/src/tools/wasm2c-wrapper.h
+++ b/src/tools/wasm2c-wrapper.h
@@ -89,7 +89,7 @@ int main(int argc, char** argv) {
(*Z_hangLimitInitializerZ_vv)();
// Prepare to call the export, so we can catch traps.
- if (setjmp(g_jmp_buf) != 0) {
+ if (WASM_RT_SETJMP(g_jmp_buf) != 0) {
puts("exception!");
} else {
// Call the proper export.