Stream: git-wasmtime

Topic: wasmtime / PR #12282 add missing may-block checks for syn...


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

dicej opened PR #12282 from dicej:better-may-block-tracking to bytecodealliance:main:

Previously, we weren't updating or checking the may-block status of a task across sync-to-sync, guest-to-guest calls, meaning we were allowing blocking in cases we shouldn't have.

This fixes that by adding a new task_may_block field to VMComponentContext, plus code to update it every time we switch threads or do a sync-to-sync, guest-to-guest call. We use that field as the source of truth about whether a blocking operation is permitted.

I've updated various tests to match, and Luke has an item on his to-do list to add sad-path coverage for various cases to the upstream component-model test suite.

<!--
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 08 2026 at 00:21):

dicej has marked PR #12282 as ready for review.

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

dicej requested alexcrichton for a review on PR #12282.

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

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

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

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

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 03:29):

dicej updated PR #12282.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 15:53):

alexcrichton submitted PR review:

Test-wise, to confirm, you feel that the upstream spec tests adequately cover this? And/or the test updates that were required here? Or should some dedicated tests be written as well?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 15:53):

alexcrichton created PR review comment:

While technically this should work, I think this'll want to be ret.ptr.size_of_vmglobal_definition() because we view this allocation region as a global, right?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 15:53):

alexcrichton created PR review comment:

Can you update the comment at the top of the file to match this pseudo-struct?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 15:53):

alexcrichton created PR review comment:

The old InstanceFlags structure is pretty unsafe due to retaining a long-lived pointer disconnected from the ComponentInstance, so ideally we wouldn't model this after that if we don't need to. Would it be possible to have safe get/set/as_raw methods on ComponentInstance and avoid having this type entirely?

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

dicej updated PR #12282.

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

dicej updated PR #12282.

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

dicej updated PR #12282.

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

dicej updated PR #12282.

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

dicej updated PR #12282.

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

dicej merged PR #12282.


Last updated: Jan 09 2026 at 13:15 UTC