cfallin requested fitzgen for a review on PR #15222.
cfallin opened PR #15222 from cfallin:fix-frame-handle to bytecodealliance:main:
We keep an "execution version" in the store that is used to invalidate
FrameHandles, which are a part of the debug API that can introspect guest-execution stack frames. These frame handles must not themselves hold borrows of the store (because debuggers are allowed to mutate execution), but must be usable with the store only and exactly when they still point to valid frames. Invalidation on any Wasm execution is how we enforce this.Unfortunately while we added an epoch-bump to ordinary Wasm-to-host trampolines, we missed it in Wasm-to-builtin trampolines; and this kind of host entry can also lead to arbitrary actions/additional execution in the Wasm that could invalidate frame handles. (Most simply: two breakpoints at different points in Wasm execution, with no other hostcalls in-between: the first could capture a frame handle and the second could try to use it, even if Wasm execution unwound frames arbitrarily in the meantime.) Basically, we need to bump the epoch whenever returning to Wasm execution, including from builtins. This PR makes that fix.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested wasmtime-compiler-reviewers for a review on PR #15222.
cfallin requested wasmtime-core-reviewers for a review on PR #15222.
:thumbs_up: fitzgen submitted PR review.
cfallin added PR #15222 Debugging: add a missing execution-version epoch bump. to the merge queue
github-merge-queue[bot] removed PR #15222 Debugging: add a missing execution-version epoch bump. from the merge queue
cfallin added PR #15222 Debugging: add a missing execution-version epoch bump. to the merge queue
:check: cfallin merged PR #15222.
cfallin removed PR #15222 Debugging: add a missing execution-version epoch bump. from the merge queue
Last updated: Nov 19 2026 at 20:05 UTC