Skip to content

Limit async stream read/write lengths#1588

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:limit-stream-sizes
Apr 14, 2026
Merged

Limit async stream read/write lengths#1588
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:limit-stream-sizes

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

The canonical ABI requires that the maximum size of any one stream operation is (1 << 28) - 1, so this commit places that limit on the runtime implementation. This generally isn't applicable but it does get used for stream without a payload where otherwise the capacity of vectors is usize::MAX, hence large reads/writes.

The canonical ABI requires that the maximum size of any one stream
operation is `(1 << 28) - 1`, so this commit places that limit on the
runtime implementation. This generally isn't applicable but it does get
used for `stream` without a payload where otherwise the capacity of
vectors is `usize::MAX`, hence large reads/writes.
@alexcrichton alexcrichton requested a review from dicej April 14, 2026 14:19
@alexcrichton alexcrichton added this pull request to the merge queue Apr 14, 2026
Merged via the queue into bytecodealliance:main with commit d1eab2f Apr 14, 2026
28 checks passed
@alexcrichton alexcrichton deleted the limit-stream-sizes branch April 14, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants