Stream: git-wasmtime

Topic: wasmtime / PR #12349 refactor recursive reentrance checks


view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 17:39):

dicej requested alexcrichton for a review on PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 17:39):

dicej requested wasmtime-compiler-reviewers for a review on PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 17:39):

dicej opened PR #12349 from dicej:reentrance-refactor-part1 to bytecodealliance:main:

This commit makes a few changes related to recursive reentrance checks, instance poisoning, etc.:

Note that this does _not_ include code to push and pop GuestTask instances for guest-to-guest sync-to-sync calls, nor for host-to-guest calls using e.g. the synchronous Func::call API, so certain intrinsics which expect a GuestTask to be present such as backpressure.inc will still fail in such cases. I'll address that in a later PR.

Also note that I made a small change to wasmtime-wit-bindgen, adding a Send bound on the T type parameter for store | async functions. This allowed me to recursively call {Typed}Func::call_concurrent from inside a host function, and it doesn't have any downsides AFAICT.

Fixes #12128

<!--
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 (Jan 14 2026 at 17:39):

dicej requested wasmtime-core-reviewers for a review on PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 18:22):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton submitted PR review:

Minor comments here and there, but overall looks great, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

stray refactoring leftover?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

To confirm, this is a debugging/testing artifact and not a required part of this change?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

You can avoid StoreComponentInstanceId::new(...).get(...) here by calling self.component_instance(instance.instance) directly I think

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

I'm surprised that existing trait implementations don't need to update with this, but I suspect that's because if the trait requires more things and then your impl requires less it's sort of a subtype relation and allowed.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

Given the destructor-ish nature of previous_runtime_state and the mild confusion with a closure, could this be inverted as, after catch_traps, an if result.is_err() { store.0.set_trapped(); }?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:07):

alexcrichton created PR review comment:

To avoid #[cfg] here, how about putting this in ComponentStoreData and defining the methods in that file as well? Also helps to clarify that this is purely scoped to components, not applicable to core wasm.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:21):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:21):

dicej created PR review comment:

It allows me to propagate the trap in the async_round_trip_synchronous_recurse tests. I.e. it's a change needed by a tests added to cover certain host-to-guest-to-host scenarios addressed by this PR.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:21):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:22):

dicej created PR review comment:

Yes, that's my understanding.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:22):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:24):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:24):

dicej created PR review comment:

This is a result of moving RuntimeInstance to a different module.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 19:25):

dicej edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 20:21):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 20:27):

dicej has enabled auto merge for PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 20:28):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 20:42):

dicej added PR #12349 refactor recursive reentrance checks to the merge queue.

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

github-merge-queue[bot] removed PR #12349 refactor recursive reentrance checks from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 21:59):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 21:59):

dicej has enabled auto merge for PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 22:12):

dicej updated PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 22:27):

dicej added PR #12349 refactor recursive reentrance checks to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 22:51):

dicej merged PR #12349.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2026 at 22:51):

dicej removed PR #12349 refactor recursive reentrance checks from the merge queue.


Last updated: Jan 29 2026 at 13:25 UTC