You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract duplicated iovec guest→host pointer translation loop into shared __lind_translate_iov() helper in addr_translation.h
Refactor existing writev and recvmsg to use the new helper
readv and sendmsg were unimplemented — glibc fell through to SYSCALL_CANCEL which doesn't do the wasm32→host split-pointer translation needed for iovec buffers. Both now follow the same pattern as writev/recvmsg: translate iov_base pointers on the stack, then MAKE_LEGACY_SYSCALL into RawPOSIX.
The reason will be displayed to describe this comment to others. Learn more.
The definition of handle_errno accepts a positive value as its input. In the logic here, when kernel_fd < 0, kernel_fd should be negative, so that's why I was saying to pass negative kernel_fd.
For consistency consideration, in same PR src/rawposix/src/net_calls.rs line 1706, it uses positive value for error handling. Maybe it worth being consistent in at least same PR and put up an issue for previous misusage.
thread 'main' (1436) panicked at /src/wasmtime/crates/fdtables/src/dashmaparrayglobal.rs:447:46:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
/tmp/wasmtest_artifacts_gqaqpf3b/signal_tests/deterministic/signal_SIGCHLD.c:36: int main(): Assertion `waited_pid >= 0' failed.
Error: failed to run main module
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
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.
While fixing the getifaddrs test which needed recvmsg I realized we have recvmsg and writev and not sendmsg and readv. This PR adds both of those.
readvandsendmsgsyscall implementations (glibc pointer translation + RawPOSIX dispatch)__lind_translate_iov()helper inaddr_translation.hwritevandrecvmsgto use the new helperreadvandsendmsgwere unimplemented — glibc fell through toSYSCALL_CANCELwhich doesn't do the wasm32→host split-pointer translation needed for iovec buffers. Both now follow the same pattern aswritev/recvmsg: translate iov_base pointers on the stack, thenMAKE_LEGACY_SYSCALLinto RawPOSIX.