dicej opened PR #7755 from dicej:backport-7750
to bytecodealliance:release-17.0.0
:
Previously,
first_non_empty_{c}io_vec
always returnedOk(None)
for buffers residing in shared memories since they cannot, in general, safely be represented as slices. That caused e.g.wasi-libc
to spin forever when trying to write to stdout usingfd_write
since it always gotOk(0)
and never made progress.This commit changes the return type of both functions to use
GuestPtr
instead ofGuestSlice{Mut}
, allowing safe access to shared guest memory.Big thanks to Alex Crichton for narrowing this down and suggesting the fix.
dicej requested pchickey for a review on PR #7755.
dicej requested wasmtime-core-reviewers for a review on PR #7755.
alexcrichton submitted PR review.
dicej merged PR #7755.
Last updated: Dec 23 2024 at 12:05 UTC