Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unfairWorker may fail due to partial write #9

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Conversation

gaukas
Copy link
Contributor

@gaukas gaukas commented Jun 18, 2024

Partial write is possible per the implementation of fd_write. This commit adds handler to properly handles the case when partial write occurs.

Fix #8.

Partial write is possible per the implementation of fd_write. This commit adds handler to properly handles the case when partial write occurs.

Signed-off-by: Gaukas Wang <[email protected]>
@gaukas gaukas requested a review from erikziyunchi as a code owner June 18, 2024 09:06
@gaukas gaukas self-assigned this Jun 18, 2024
@gaukas
Copy link
Contributor Author

gaukas commented Jun 18, 2024

Another commit will be pushed later to backport this fix to v0.

gaukas added 2 commits June 18, 2024 03:21
Backport following commits for tinygo/v0:

* fix: unfairWorker may fail due to partial write

* refactor: use == comparison for basic errors

Signed-off-by: Gaukas Wang <[email protected]>
@gaukas
Copy link
Contributor Author

gaukas commented Jun 18, 2024

Backport completed and verified to be working correctly.

@gaukas
Copy link
Contributor Author

gaukas commented Jun 18, 2024

Would you like to give a pass on this PR? @erikziyunchi

Copy link
Member

@erikziyunchi erikziyunchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, I'll upload the new WATM onto WATER-iOS to test after merging!

@gaukas gaukas merged commit 11c789f into master Jun 19, 2024
14 checks passed
@gaukas gaukas added the bug Something isn't working label Jun 25, 2024
@gaukas gaukas deleted the fix-fd-write-usage branch July 15, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: tinygo/v*.unfairWorker may fail with readN != writeN for some runtime's WASI implementation
2 participants