Stream: git-wasmtime

Topic: wasmtime / PR #15069 component: centralize `may_enter` check


view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 17:04):

adamrk opened PR #15069 from adamrk:abk/start-fn-poisoned-store to bytecodealliance:main:

There is an existing bug where the start function on will run when trying to instantiate a component in a poisoned Store. This fixes that by adding a check to may_enter within invoke_wasm_and_catch_traps so that any Wasm execution will be prevented if the store has been poisoned.

Core Wasm modules should be able to still run after trapping (this is required by some wast tests), so we add an additional flag has_components which will be false as long as no components where initialized in the store. In order to prevent checking two bools on every entry to Wasm, we only check the has_components bool when a trap occurs to decide the trap should cause the Store to be poisoned.

Two calls to may_enter are removed because they are now redundant. Another calls is kept even though it's techinically redundant because it leaves a better error message.

<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

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 (Oct 29 2026 at 17:04):

adamrk removed the review request for wasmtime-core-reviewers from PR #15069.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 17:04):

adamrk requested pchickey for a review on PR #15069.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 17:04):

adamrk requested wasmtime-core-reviewers for a review on PR #15069.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 19:44):

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

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

pchickey removed the review request for pchickey from PR #15069.

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

pchickey requested alexcrichton for a review on PR #15069.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 20:57):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 29 2026 at 20:57):

alexcrichton added PR #15069 component: centralize may_enter check to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 30 2026 at 03:50):

:check: alexcrichton merged PR #15069.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 30 2026 at 03:50):

alexcrichton removed PR #15069 component: centralize may_enter check from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC