xia-chao opened PR #14966 from xia-chao:wasi-write-permit-4streams to bytecodealliance:main:
The stdio, sink, file and C API output streams did not enforce the check-write permit: writes larger than the reported permit were accepted instead of trapping. Make these four streams trap when a write exceeds the permit, as wasi:io requires.
xia-chao removed the review request for wasmtime-wasi-reviewers from PR #14966.
xia-chao requested wasmtime-wasi-reviewers for a review on PR #14966.
xia-chao requested rvolosatovs for a review on PR #14966.
xia-chao removed the review request for wasmtime-core-reviewers from PR #14966.
xia-chao requested dicej for a review on PR #14966.
xia-chao requested wasmtime-core-reviewers for a review on PR #14966.
github-actions[bot] added the label wasi on PR #14966.
github-actions[bot] added the label wasmtime:c-api on PR #14966.
:repeat: pchickey submitted PR review.
:speech_balloon: pchickey created PR review comment:
I don't think that it is worthwhile for us to track whether check_write has issued the permit, we just need to trap when write exceeds the permitted size, which it already does. So, all of these changes to the cli streams should be thrown away - they already obey the spec from my reading as well as what we enforce in other streams.
:speech_balloon: pchickey created PR review comment:
this const should be hoisted out to the parent scope, and used in the check_write method as well
pchickey commented on PR #14966:
This PR is borderline on my radar of needing more careful human review before submission - the changes to c-api and pipe are fundamentally completely different to those proposed in the changes to the stdout/stderr streams, and it would have been nice if you had caught that before submitting.
xia-chao updated PR #14966.
xia-chao edited PR #14966:
Dropped the cli tracking. The c-api, sink and file streams now trap when a write exceeds the check-write permit, with one shared budget.
xia-chao commented on PR #14966:
Noted.
:thumbs_up: pchickey submitted PR review.
pchickey added PR #14966 wasi:io: enforce the check-write permit in the remaining output streams to the merge queue.
github-merge-queue[bot] removed PR #14966 wasi:io: enforce the check-write permit in the remaining output streams from the merge queue.
pchickey commented on PR #14966:
CI should be fixed by #14998
pchickey added PR #14966 wasi:io: enforce the check-write permit in the remaining output streams to the merge queue.
pchickey removed PR #14966 wasi:io: enforce the check-write permit in the remaining output streams from the merge queue.
:check: pchickey merged PR #14966.
Last updated: Oct 31 2026 at 23:03 UTC