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