From a593c889da411680b1030de65cd0edfb61a35e92 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 2 Oct 2020 15:26:11 -0700 Subject: [PATCH 1/2] Stack probes are not ordinary functions. --- lib/vm/src/libcalls.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/vm/src/libcalls.rs b/lib/vm/src/libcalls.rs index da8604b3d1e..1750e7a85b8 100644 --- a/lib/vm/src/libcalls.rs +++ b/lib/vm/src/libcalls.rs @@ -396,11 +396,10 @@ pub unsafe extern "C" fn wasmer_raise_trap(trap_code: TrapCode) -> ! { /// /// # Safety /// -/// To be defined (TODO) +/// This function does not follow the standard function ABI, and is called as +/// part of the function prologue. #[no_mangle] -pub unsafe extern "C" fn wasmer_probestack() { - PROBESTACK(); -} +pub static wasmer_probestack: unsafe extern "C" fn() = PROBESTACK; /// The name of a runtime library routine. /// From 54d671e6133695bda8c35f77fb3eb9c7f949a1ba Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 2 Oct 2020 15:33:36 -0700 Subject: [PATCH 2/2] Add a changelog entry. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 267fd762c7a..d195b62b70b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## **[Unreleased]** +- [#1671](https://github.com/wasmerio/wasmer/pull/1671) Fix probestack firing inappropriately, and sometimes over/under allocating stack. - [#1657](https://github.com/wasmerio/wasmer/pull/1657) Implement `wasm_trap_t` and `wasm_frame_t` for Wasm C API; add examples in Rust and C of exiting early with a host function. - [#1645](https://github.com/wasmerio/wasmer/pull/1645) Move the install script to https://github.com/wasmerio/wasmer-install