Stream: git-wasmtime

Topic: wasmtime / PR #14533 wasi:io: do not trap on a zero-lengt...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 11:27):

xia-chao opened PR #14533 from xia-chao:empty-write-noop to bytecodealliance:main:

Empty writes must not trap. In wasi:io, check-write returning ok(0) still permits len == 0. The file output stream rejected an empty write while a write was in flight, aborting the guest.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 11:27):

xia-chao requested rvolosatovs for a review on PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 11:27):

xia-chao requested wasmtime-wasi-reviewers for a review on PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 11:27):

xia-chao requested cfallin for a review on PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 11:27):

xia-chao requested wasmtime-core-reviewers for a review on PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 13:53):

github-actions[bot] added the label wasi on PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 14:27):

alexcrichton commented on PR #14533:

To me this seems like an edge case where the spec is probably ambiguous about what's supposed to happen. Is this motivated by real-world usage? Or an audit? (or is the spec actually precise in this respect and I'm misremembering?)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:14):

xia-chao commented on PR #14533:

An audit, not a user report.
You can take a look at the following code!

https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/wasi-io/wit/deps/io.wit#L184-L204

https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/wasi/src/p2/filesystem.rs#L288-L292

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:20):

xia-chao commented on PR #14533:

The spec is clear: write requires len(contents) <= n, and check-write can return ok(0). So write([]) after ok(0) is valid.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:37):

:thumbs_up: alexcrichton submitted PR review:

Sounds reasonable to me :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:37):

alexcrichton added PR #14533 wasi:io: do not trap on a zero-length write to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:59):

:check: alexcrichton merged PR #14533.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2026 at 15:59):

alexcrichton removed PR #14533 wasi:io: do not trap on a zero-length write from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC