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 fd with append flag can't seek correctly #5160

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

yagehu
Copy link
Contributor

@yagehu yagehu commented Oct 19, 2024

This commit fixes an incompatible behavior (with other runtimes, and POSIX) when an fd that was opened with fdflags::append cannot seek to the right offset with fd_seek. The append flag should not "lock" the offset at the end, as it's possible to seek to another offset and read from it.

This passes all the wasi-fyi tests.

fixes #5159

This commit fixes an incompatible behavior (with other runtimes, and
POSIX) when an fd that was opened with `fdflags::append` cannot seek to
the right offset with `fd_seek`.  The append flag should not "lock" the
offset at the end, as it's possible to seek to another offset and read
from it.

Signed-off-by: Yage Hu <[email protected]>
Signed-off-by: Yage Hu <[email protected]>
@yagehu yagehu requested a review from syrusakbary October 19, 2024 14:30
Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

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

Great, thanks. Will wait for @maminrayej review

@syrusakbary syrusakbary merged commit b94206b into wasmerio:main Oct 22, 2024
70 of 72 checks passed
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.

Cannot fd_seek with fdflags::append
3 participants