Fixes incorrect guest fd encoding#173
Merged
sunfishcode merged 1 commit intobytecodealliance:masterfrom Jun 19, 2019
kubkon:wasi-c-fix
Merged
Fixes incorrect guest fd encoding#173sunfishcode merged 1 commit intobytecodealliance:masterfrom kubkon:wasi-c-fix
fd encoding#173sunfishcode merged 1 commit intobytecodealliance:masterfrom
kubkon:wasi-c-fix
Conversation
Surfaced when running sunfishcode/misc-tests. When trying to truncate the file without the __WASI_RIGHT_PATH_FILESTAT_SET_SIZE right, error __WASI_ENOTCAPABLE was correctly returned, however, the guest fd pointer was not encoded to -1 in that case. This commit fixes it by taking out the guest fd encoding out of the conditional branch which turns out obsolete.
Member
|
Makes sense. |
kubkon
pushed a commit
that referenced
this pull request
Nov 7, 2019
* Bump crate versions. * Update dependency version numbers too. This is a follow-up to f96b6c9e72ae50fcddd488be47a2d4b5ac7b926b to update the version numbers in the local dependencies too.
grishasobol
pushed a commit
to grishasobol/wasmtime
that referenced
this pull request
Nov 29, 2021
…ance#173) * Add a check if NotStartedModuleRef has a start function * Removed redundant doc comment Co-Authored-By: elichai <elichai.turkel@gmail.com>
dhil
pushed a commit
to dhil/wasmtime
that referenced
this pull request
May 16, 2024
) The C API for using the wasmtime linker currently only gives access to the `allow_shadowing` setting of the linker, but not to the `allow_unknown_exports` setting. However, the latter setting needs to be enabled in order to allow exporting the global `__stack_pointer`. This is what's causing the issue described in wasmfx/waeio#2. (Alternatively, we may add `__stack_pointer` to the list of blessed globals in the `command` function in crates/wasmtime/src/runtime/linker.rs, but the comments there suggest that new items shouldn't be added to that list. Therefore, just making this setting accessible in the C API seems less controversial.)
avanhatt
pushed a commit
to wellesley-prog-sys/wasmtime
that referenced
this pull request
Oct 23, 2024
avanhatt
pushed a commit
to wellesley-prog-sys/wasmtime
that referenced
this pull request
Oct 23, 2024
dicej
pushed a commit
to dicej/wasmtime
that referenced
this pull request
May 27, 2025
Merge upstream/main
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.
Surfaced when running sunfishcode/misc-tests. When trying to truncate the file without the
__WASI_RIGHT_PATH_FILESTAT_SET_SIZEright, error__WASI_ENOTCAPABLEwas correctly returned, however, the guestfdpointer was not encoded to -1 in that case. This commit fixes it by taking out the guestfdencoding out of the conditional branch which turns out obsolete.To elaborate, before this fix, if everything was successful,
host_fdwith the resultant file descriptor value would be correctly encoded inside thefdpointer. However, if there was an error inhost::wasmtime_ssp_path_opencall, thehost_fdwould correctly storewasm32::__wasi_fd_t::max_value()(equivalent to -1) butfdpointer would be untouched due to the encoding operation being behind an if statement which would be triggered only whenpath_openwas successful.