summaryrefslogtreecommitdiff
path: root/wasm2c/wasm-rt-impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'wasm2c/wasm-rt-impl.c')
-rw-r--r--wasm2c/wasm-rt-impl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wasm2c/wasm-rt-impl.c b/wasm2c/wasm-rt-impl.c
index 2404d7d1..81804a39 100644
--- a/wasm2c/wasm-rt-impl.c
+++ b/wasm2c/wasm-rt-impl.c
@@ -32,6 +32,7 @@ typedef struct FuncType {
} FuncType;
uint32_t wasm_rt_call_stack_depth;
+uint32_t g_saved_call_stack_depth;
jmp_buf g_jmp_buf;
FuncType* g_func_types;
@@ -39,6 +40,7 @@ uint32_t g_func_type_count;
void wasm_rt_trap(wasm_rt_trap_t code) {
assert(code != WASM_RT_TRAP_NONE);
+ wasm_rt_call_stack_depth = g_saved_call_stack_depth;
longjmp(g_jmp_buf, code);
}