Stream: git-wasmtime

Topic: wasmtime / PR #12515 fix: skip drop_fibers_and_futures wh...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 12:51):

zacharywhitley opened PR #12515 from tegmentum:fix/skip-async-cleanup-when-disabled to bytecodealliance:main:

Summary

When the component-model-async feature is compiled in but the store was created without concurrency support, concurrent_state is None. During Store::drop, drop_fibers_and_futures is called which then calls concurrent_state_mut(). This panics because concurrent_state_mut() unwraps the None value.

This fix adds a runtime check to early-return when concurrency_support() returns false, preventing the panic during Store drop.

Problem

In crates/wasmtime/src/runtime/store.rs:

pub(crate) fn concurrent_state_mut(&mut self) -> &mut concurrent::ConcurrentState {
    debug_assert!(self.concurrency_support());
    self.concurrent_state.as_mut().unwrap()  // Panics if concurrent_state is None
}

The debug_assert! only catches this in debug builds, but in release builds the unwrap() will panic.

Fix

Add a guard in drop_fibers_and_futures:

pub(crate) fn drop_fibers_and_futures(store: &mut dyn VMStore) {
    if !store.concurrency_support() {
        return;
    }
    // ... rest of cleanup
}

Test Plan

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 12:51):

zacharywhitley requested fitzgen for a review on PR #12515.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 12:51):

zacharywhitley requested wasmtime-core-reviewers for a review on PR #12515.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 14:03):

github-actions[bot] added the label wasmtime:api on PR #12515.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2026 at 15:27):

alexcrichton commented on PR #12515:

Can you add a test for this as well? Somewhere in tests/all/*.rs for example


Last updated: Feb 24 2026 at 04:36 UTC