Skip to content

Cranelift: Traps need not be considered GC safepoints anymore#8810

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:traps-are-not-safepoints
Jun 14, 2024
Merged

Cranelift: Traps need not be considered GC safepoints anymore#8810
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:traps-are-not-safepoints

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Jun 14, 2024

After #8809, the mutator cannot resume from a trap so we don't need to consider them safepoints, as no GC-managed references are live after the trap. The one exception being the debugtrap CLIF instruction, which is technically still a resumable trap, but which exists only for emitting the equivalent of an int3 breakpoint instruction for pausing in a debugger to inspect state, and should never be used for mutator-collector interactions.

After bytecodealliance#8809, the mutator cannot
resume from a trap so we don't need to consider them safepoints, as no
GC-managed references are live after the trap. The one exception being the
`debugtrap` CLIF instruction, which is technically still a resumable trap, but
which exists only for emitting the equivalent of an `int3` breakpoint
instruction for pausing in a debugger to inspect state, and should never be used
for mutator-collector interactions.
@fitzgen fitzgen requested a review from a team as a code owner June 14, 2024 19:43
@fitzgen fitzgen requested review from cfallin and removed request for a team June 14, 2024 19:43
@fitzgen fitzgen added this pull request to the merge queue Jun 14, 2024
Merged via the queue into bytecodealliance:main with commit 9c5ec3e Jun 14, 2024
@fitzgen fitzgen deleted the traps-are-not-safepoints branch June 14, 2024 20:10
fitzgen added a commit to fitzgen/wasmtime that referenced this pull request Jun 14, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Jun 14, 2024
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