Skip to content

Debugging: set vmctx slot before top-of-function epoch yield point.#12664

Merged
cfallin merged 1 commit intobytecodealliance:mainfrom
cfallin:debugging-early-epoch-yield-vmctx
Feb 25, 2026
Merged

Debugging: set vmctx slot before top-of-function epoch yield point.#12664
cfallin merged 1 commit intobytecodealliance:mainfrom
cfallin:debugging-early-epoch-yield-vmctx

Conversation

@cfallin
Copy link
Member

@cfallin cfallin commented Feb 25, 2026

Epoch yields emit debug events, and the debug event handler can walk the stack and look at the instance associated with each frame, which requires vmctx. We weren't setting the vmctx slot until after the epoch check in the function preamble, exposing a null or uninitialized slot to the accessor. This PR fixes that by hoisting the initialization to the very top of the preamble.

Epoch yields emit debug events, and the debug event handler can walk
the stack and look at the instance associated with each frame, which
requires `vmctx`. We weren't setting the `vmctx` slot until after the
epoch check in the function preamble, exposing a null or uninitialized
slot to the accessor. This PR fixes that by hoisting the
initialization to the very top of the preamble.
@cfallin cfallin requested a review from alexcrichton February 25, 2026 08:16
@cfallin cfallin requested review from a team as code owners February 25, 2026 08:16
@alexcrichton alexcrichton added this pull request to the merge queue Feb 25, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 25, 2026
@cfallin cfallin added this pull request to the merge queue Feb 25, 2026
Merged via the queue into bytecodealliance:main with commit c99bf94 Feb 25, 2026
45 checks passed
@cfallin cfallin deleted the debugging-early-epoch-yield-vmctx branch February 25, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants