Check may-leave flags in trampolines, not Rust#12427
Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom Feb 3, 2026
Merged
Check may-leave flags in trampolines, not Rust#12427alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton merged 1 commit intobytecodealliance:mainfrom
Conversation
Member
Author
|
This is a draft for now because the new tests I added are failing (some intrinsics aren't supporting being called in post-return for example) and I need to bottom that out. |
Member
Author
|
In discussion with @dicej on this we see 1 of two paths forward:
We're currently thinking of pursuing (1) here pending if anyonoe has use cases on Zulip. |
c02f116 to
4611675
Compare
This commit moves all may-leave flag handling into compiled trampolines rather than doing this in Rust. This means it can't be forgotten on the Rust side of things and will be slightly more efficient to boot. This then additionally exempts some intrinsics from checking may-leave since Wasmtime erroneously checked when it shouldn't have. Closes bytecodealliance#12397 Closes bytecodealliance#12403
4611675 to
6e06517
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit moves all may-leave flag handling into compiled trampolines rather than doing this in Rust. This means it can't be forgotten on the Rust side of things and will be slightly more efficient to boot. This then additionally exempts some intrinsics from checking may-leave since Wasmtime erroneously checked when it shouldn't have.
Closes #12397
Closes #12403