-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move *mut dyn VMStore
out of VMContext
#10040
Merged
alexcrichton
merged 3 commits into
bytecodealliance:main
from
alexcrichton:move-out-of-vmcontext
Jan 23, 2025
Merged
Move *mut dyn VMStore
out of VMContext
#10040
alexcrichton
merged 3 commits into
bytecodealliance:main
from
alexcrichton:move-out-of-vmcontext
Jan 23, 2025
Conversation
This file contains 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
github-actions
bot
added
the
wasmtime:api
Related to the API of the `wasmtime` crate itself
label
Jan 17, 2025
fitzgen
approved these changes
Jan 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
alexcrichton
force-pushed
the
move-out-of-vmcontext
branch
from
January 21, 2025 19:51
cd6c737
to
da3cd01
Compare
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Jan 21, 2025
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Jan 21, 2025
This commit fixes a crash found in the CI of bytecodealliance#10040. That PR itself isn't the fault per-se but rather uncovered a preexisting issue on riscv64. According to riscv64's ABI docs it looks like arguments are all expected to be sign-extended, whereas currently in Wasmtime all host signatures are zero-extended on all platforms. This commit applies two changes to fix this: * A new `TargetIsa::default_argument_extension` method was added which is now used instead of unconditionally using `uext` to apply to all arguments/results. * While I was here I went ahead and split apart things where the wasm signature of a builtin doesn't use `uext` or `sext`. The host signature still does, however, which means that any extension necessary happens in the trampoline we generate per-libcall as opposed to at all callsites. I'm not certain that all platforms require `uext` but I've left the `TargetIsa` implementation as `uext` for now with a comment explaining why. Currently the only non-`uext` platforms are riscv64, which is `sext` to fix the issue from bytecodealliance#10040, and Pulley which is "none" as things work differently there.
I believe the crashes in CI are due to #10069, so I'm going to re-queue this once that merges (didn't want to mix that up in over here) |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 23, 2025
* Fix argument extension on riscv64 for Wasmtime builtins This commit fixes a crash found in the CI of #10040. That PR itself isn't the fault per-se but rather uncovered a preexisting issue on riscv64. According to riscv64's ABI docs it looks like arguments are all expected to be sign-extended, whereas currently in Wasmtime all host signatures are zero-extended on all platforms. This commit applies two changes to fix this: * A new `TargetIsa::default_argument_extension` method was added which is now used instead of unconditionally using `uext` to apply to all arguments/results. * While I was here I went ahead and split apart things where the wasm signature of a builtin doesn't use `uext` or `sext`. The host signature still does, however, which means that any extension necessary happens in the trampoline we generate per-libcall as opposed to at all callsites. I'm not certain that all platforms require `uext` but I've left the `TargetIsa` implementation as `uext` for now with a comment explaining why. Currently the only non-`uext` platforms are riscv64, which is `sext` to fix the issue from #10040, and Pulley which is "none" as things work differently there. * Update test expectations
There's no need for this type to be accessible from compiled code, so store and manage it entirely from Rust instead.
alexcrichton
force-pushed
the
move-out-of-vmcontext
branch
from
January 23, 2025 15:44
da3cd01
to
a5b0efd
Compare
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.
There's no need for this type to be accessible from compiled code, so store and manage it entirely from Rust instead.