-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
io: avoid ptr->ref->ptr roundtrip in RegistrationSet
#6929
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fcebdb6
First fix for io_async_fd
tiif 587631c
Add fix
tiif c1e15f1
Add annotation
tiif a011eb5
Add one more annotation and fix wording
tiif 7ada9c8
Remove accidentally committed swp file and remove the first fix attempt
tiif 78fd183
Merge branch 'master' into io_async_fd_fix
tiif 5c59afa
Remove spurious change
tiif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth implementing F_GETFL in Miri? That doesn't sound like it would be particularly hard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I think it's worth it. We just need to make miri remember the flag whenever it is used, then return it when
F_GETFL
is called.But looking at the codepath, to properly support the test here, we might also need
F_SETFL
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O_NONBLOCK is the only flag we currently support that could be exposed via that.
And yeah, adding both GET and SET makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned about the interaction between
F_SETFL
and anything that involvesthis.block_thread
becauseF_SETFL
can change the status ofO_NONBLOCK
flag. But I can't verify if the concern is valid until I test it out, we can always get it done first and see if the problem arise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we to decide what happens when a previously blocking FD is marked as non-blocking and there are waiting threads. Do they wake up immediately, or at some later point, or never?
@tiif can you file a Miri issue, and note this question there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure rust-lang/miri#4119.