-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Mark BufferedChannelIterator.continuation @BeningDataRace to address … #3873
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
Conversation
…potential UB and OoTA on K/N Fixes #3834
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 think we could document this more reliably and intuitively, but other than that, everything looks good.
@@ -1583,6 +1583,7 @@ internal open class BufferedChannel<E>( | |||
* continuation. The [tryResumeHasNext] and [tryResumeHasNextOnClosedChannel] | |||
* function resume this continuation when the [hasNext] invocation should complete. | |||
*/ | |||
@BenignDataRace // See its uses for the explanation of the race |
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 think we should explicitly list the races right next to the annotation. This way, if a new race is discovered, we won't look at the annotation and go, "oh yeah, we know about this race, it's benign, no worries."
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.
Good idea, fixed
*/ | ||
@BenignDataRace |
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 like the explanation here, for example.
* Mark BufferedChannelIterator.continuation as @BeningDataRace to address potential UB and OoTA on K/N * Explain benign data-race on SelectImplementation.clauses and mark it with @BenignDataRace * Explain benign data-race on SelectImplementation.internalResult and mark it with @BenignDataRace Fixes #3834 Fixes #3843
…potential UB and OoTA on K/N
Fixes #3834