alexcrichton opened PR #13086 from alexcrichton:cap-sizes to bytecodealliance:main:
The spec mandates that stream operations cannot exceed
2**28elements, but Wasmtime previously did not check for this limit. This meant that the guest could get silently corrupt answers when trying to operate on this many elements. This commit adds a newItemCountnewtype wrapper which is intended to be proof of an in-bounds count and then that's plumbed everywhere internally.Closes #13023
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested cfallin for a review on PR #13086.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13086.
alexcrichton requested dicej for a review on PR #13086.
alexcrichton unassigned cfallin from PR #13086 cm-async: Cap read/write sizes on streams.
github-actions[bot] added the label wasmtime:api on PR #13086.
github-actions[bot] added the label wasmtime:c-api on PR #13086.
dicej submitted PR review.
alexcrichton updated PR #13086.
alexcrichton updated PR #13086.
alexcrichton requested uweigand for a review on PR #13086.
alexcrichton requested wasmtime-default-reviewers for a review on PR #13086.
alexcrichton has enabled auto merge for PR #13086.
alexcrichton added PR #13086 cm-async: Cap read/write sizes on streams to the merge queue.
alexcrichton merged PR #13086.
alexcrichton removed PR #13086 cm-async: Cap read/write sizes on streams from the merge queue.
Last updated: May 03 2026 at 22:13 UTC