Stream: git-wasmtime

Topic: wasmtime / issue #12158 wasip2/component panics when prof...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 20:15):

vavrusa opened issue #12158:

Test Case

At least any wasip2 program crashes when compiling and profiler is enabled in config. Here's an example. Similar to https://github.com/bytecodealliance/wasmtime/issues/8734

% git diff
diff --git a/examples/wasip2-async/main.rs b/examples/wasip2-async/main.rs
index db44473d5..e0a26bb5f 100644
--- a/examples/wasip2-async/main.rs
+++ b/examples/wasip2-async/main.rs
@@ -35,6 +35,7 @@ async fn main() -> Result<()> {
     // Construct the wasm engine with async support enabled.
     let mut config = Config::new();
     config.async_support(true);
+    config.profiler(wasmtime::ProfilingStrategy::PerfMap);
     let engine = Engine::new(&config)?;
     let mut linker = Linker::new(&engine);
     wasmtime_wasi::p2::add_to_linker_async(&mut linker)?;

Steps to Reproduce

% cmake examples/
% make
% cargo run --example wasip2-async
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s
     Running `target/debug/examples/wasip2-async`

thread 'main' (27706816) panicked at crates/wasmtime/src/runtime/instantiate.rs:179:17:
assertion `left == right` failed
  left: StaticModuleIndex(1)
 right: StaticModuleIndex(0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected Results

Not panicking

Actual Results

Panics

Versions and Environment

Wasmtime version or commit: v39

Operating system: MacOS and Linux

Architecture: aarch64 and amd64

Extra Info

I upgraded from v22 to v39, not sure when it broke but is also broken on current main branch.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 20:15):

vavrusa added the bug label to Issue #12158.


Last updated: Dec 13 2025 at 19:03 UTC