diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs index e4788d161766..9082db29a708 100644 --- a/crates/cranelift/src/compiler.rs +++ b/crates/cranelift/src/compiler.rs @@ -1135,7 +1135,7 @@ fn save_last_wasm_exit_fp_and_pc( ); builder .ins() - .trapnz(is_overflow, ir::TrapCode::StackOverflow); + .trapnz(is_overflow, ir::TrapCode::STACK_OVERFLOW); // Save the exit Wasm FP to the limits. We dereference the current FP to get // the previous FP because the current FP is the trampoline's FP, and we diff --git a/crates/wasmtime/src/runtime/vm/interpreter.rs b/crates/wasmtime/src/runtime/vm/interpreter.rs index a0ec7a8e196a..100650b6b908 100644 --- a/crates/wasmtime/src/runtime/vm/interpreter.rs +++ b/crates/wasmtime/src/runtime/vm/interpreter.rs @@ -129,6 +129,7 @@ impl InterpreterRef<'_> { let regs = TrapRegisters { pc: pc.as_ptr() as usize, fp: self.0[XReg::fp].get_ptr::() as usize, + sp: self.0[XReg::sp].get_ptr::() as usize, }; tls::with(|s| { let s = s.unwrap();