Skip to content

wasip3: Fix updating offset during read/write #791

Merged
alexcrichton merged 1 commit intoWebAssembly:mainfrom
alexcrichton:update-offsets-more
Apr 22, 2026
Merged

wasip3: Fix updating offset during read/write #791
alexcrichton merged 1 commit intoWebAssembly:mainfrom
alexcrichton:update-offsets-more

Conversation

@alexcrichton
Copy link
Copy Markdown
Collaborator

This commit refactors how offset is updated during the internal
read/write operations on streams. This isn't applicable for TCP but
matters for files, for example. There's not a great way to test the
paths that were previously missing the update but the code is structured
differently now to make it much harder to forget to do an update. The
test modified here is a light test which doesn't reproduce the original
issue but at least ensures that nonblocking paths update the offset as
well.

Note: this is temporarily built on #788

@alexcrichton alexcrichton requested a review from dicej April 21, 2026 20:05
This commit refactors how `offset` is updated during the internal
read/write operations on streams. This isn't applicable for TCP but
matters for files, for example. There's not a great way to test the
paths that were previously missing the update but the code is structured
differently now to make it much harder to forget to do an update. The
test modified here is a light test which doesn't reproduce the original
issue but at least ensures that nonblocking paths update the offset as
well.
@alexcrichton alexcrichton enabled auto-merge (squash) April 22, 2026 15:17
@alexcrichton alexcrichton merged commit 2f31cf1 into WebAssembly:main Apr 22, 2026
63 of 66 checks passed
@alexcrichton alexcrichton deleted the update-offsets-more branch April 22, 2026 18:49
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