Stream: git-wasmtime

Topic: wasmtime / PR #11468 Make const-expr evaluation `async`


view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2025 at 22:51):

alexcrichton opened PR #11468 from alexcrichton:more-gc-async to bytecodealliance:main:

This commit is extracted from #11430 to accurately reflect how const-expr evaluation is an async operation due to GC pauses that may happen. The changes in this commit are:

This ended up fixing a niche issue with GC where if a wasm execution was suspended during table.init, for example, during a const-expr evaluation triggering a GC then if the wasm execution was cancelled it would panic the host. This panic was because the GC operation returned Result but it was unwrap'd as part of the const-expr evaluation which can fail not only to invalid-ness but also due to "computation is cancelled" traps.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2025 at 22:51):

alexcrichton requested pchickey for a review on PR #11468.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2025 at 22:51):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11468.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2025 at 22:52):

alexcrichton commented on PR #11468:

Actually, thinking more, the issue about panicking on const expr evaluation failure means allocation failure in GC is a host panic which isn't great. Deferring that to a separate issue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2025 at 22:57):

alexcrichton updated PR #11468.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 02:18):

github-actions[bot] commented on PR #11468:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 16:23):

alexcrichton updated PR #11468.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 16:48):

pchickey requested fitzgen for a review on PR #11468.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:20):

fitzgen submitted PR review:

:+1:

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:20):

fitzgen created PR review comment:

Are there any non-async retry_after_gc calls at this point? I think all of them should be async by the time we finish the asyncification of the internals, but I'm not sure if we are there yet or not. But when we are, we should delete the non-async version and then just rename the async variation to plain retry_after_gc.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:20):

fitzgen created PR review comment:

And then Instance::new_raw will become an async function in another follow up PR?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:26):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:26):

alexcrichton created PR review comment:

Soon! (got a PR queued up after #11470 to delete the sync version

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:27):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:27):

alexcrichton created PR review comment:

Indeed! That'll be #11470

view this post on Zulip Wasmtime GitHub notifications bot (Aug 20 2025 at 17:51):

alexcrichton merged PR #11468.


Last updated: Dec 06 2025 at 07:03 UTC