Skip to content

Fix an off-by one assertion in Wasmtime#13313

Open
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
alexcrichton:minor-fix
Open

Fix an off-by one assertion in Wasmtime#13313
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
alexcrichton:minor-fix

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

When switching off a fiber in Wasmtime there's a guard check to ensure that the CallThreadState is no longer present on the stack that we're switching from. This assertion has an off-by-one that's technically unreachable in practice but the check is still incorrect. Use a slightly more idiomatic check to resolve this very minor issue.

When switching off a fiber in Wasmtime there's a guard check to ensure
that the `CallThreadState` is no longer present on the stack that we're
switching from. This assertion has an off-by-one that's technically
unreachable in practice but the check is still incorrect. Use a slightly
more idiomatic check to resolve this very minor issue.
@alexcrichton alexcrichton requested a review from a team as a code owner May 7, 2026 00:23
@alexcrichton alexcrichton requested review from pchickey and removed request for a team May 7, 2026 00:23
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants