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

Force some more permission checks with 0-length writes #8822

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

alexcrichton
Copy link
Member

When a 0-length write is performed try to send the write all the way to the underlying file descriptor to at least check that it's valid to write.

Closes #8818

When a 0-length write is performed try to send the write all the way to
the underlying file descriptor to at least check that it's valid to
write.

Closes bytecodealliance#8818
@alexcrichton alexcrichton requested a review from a team as a code owner June 17, 2024 18:38
@alexcrichton alexcrichton requested review from elliottt and removed request for a team June 17, 2024 18:38
Copy link
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

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

Looks good to me!

crates/test-programs/src/bin/preview1_file_write.rs Outdated Show resolved Hide resolved
Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com>
@alexcrichton alexcrichton added this pull request to the merge queue Jun 17, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2024
* Force some more permission checks with 0-length writes

When a 0-length write is performed try to send the write all the way to
the underlying file descriptor to at least check that it's valid to
write.

Closes #8818

* Update crates/test-programs/src/bin/preview1_file_write.rs

Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com>

---------

Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 17, 2024
@alexcrichton
Copy link
Member Author

Looks like the error differs on Windows and Linux. For now I've just updated the test to accept both errors.

@alexcrichton alexcrichton added this pull request to the merge queue Jun 17, 2024
Merged via the queue into bytecodealliance:main with commit 64126f7 Jun 17, 2024
36 checks passed
@alexcrichton alexcrichton deleted the zero-length-writes branch June 17, 2024 20:04
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.

write success, but not expected.
2 participants