diff --git a/crates/wasi-preview1-component-adapter/src/lib.rs b/crates/wasi-preview1-component-adapter/src/lib.rs index 7ce52c6..55a8480 100644 --- a/crates/wasi-preview1-component-adapter/src/lib.rs +++ b/crates/wasi-preview1-component-adapter/src/lib.rs @@ -129,6 +129,9 @@ pub extern "C" fn run() -> u32 { unsafe extern "C" { safe fn _start(); } + // Reserve adapter state before Go snapshots the linear-memory heap extent. + // Lazy memory.grow allocations otherwise overlap Go's sbrk allocator. + State::ptr(); _start(); 0 }