Stream: git-wasmtime

Topic: wasmtime / PR #11353 ensure component value lowerings are...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 19:54):

dicej requested alexcrichton for a review on PR #11353.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 19:54):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 19:54):

dicej opened PR #11353 from dicej:lower-on-worker-fiber to bytecodealliance:main:

This is necessary because lowering a component value may require calling realloc, which may involve epoch interruption, which may require suspending the current fiber. Which obviously doesn't work if we're not running in a fiber. Also, we need to make sure there are no host frames on the stack.

Note the use of Mutex for WorkItem::WorkerFunction and WorkerItem::Function. We never lock the mutex -- it's only used to plumb through the inner, non-Sync value while satisfying the compiler that Store is Sync.

<!--
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 (Jul 30 2025 at 19:58):

dicej commented on PR #11353:

This should fix https://github.com/bytecodealliance/wasmtime/issues/11348

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 19:59):

dicej edited a comment on PR #11353:

This should fix https://github.com/bytecodealliance/wasmtime/issues/11348 (and I've verified tests pass with Alex's assertion).

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 20:04):

alexcrichton submitted PR review:

Nice! That was easier to fix than expected. Happy to see this merged whenever, but a few thoughts too:

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

dicej updated PR #11353.

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

dicej commented on PR #11353:

I just added the assertion. I had to gate it on the component-model-async feature because StoreOpaque::with_blocking is gated on that. Alternatively, we could ungate them both.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 20:19):

dicej commented on PR #11353:

Agreed about using something simpler than a Mutex to make stuff like this Sync -- performance aside, it's confusing to readers to have Mutexs all over the place that are never locked.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 20:20):

alexcrichton commented on PR #11353:

It's ok to leave it gated for now, eventually I think we're going to want to lift more out of the feature gate but it's ok to defer that to later.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 30 2025 at 21:17):

dicej merged PR #11353.


Last updated: Dec 06 2025 at 06:05 UTC