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 read_buf uses in std #125404

Merged
merged 5 commits into from
Sep 28, 2024
Merged

Fix read_buf uses in std #125404

merged 5 commits into from
Sep 28, 2024

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented May 22, 2024

Following lib-team decision here: #78485 (comment)

Guard against the pathological behavior of both returning an error and performing a read.

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2024

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 22, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

Waiting to see how a bit more of the discussion plays out given #78485 (comment)

@briansmith
Copy link
Contributor

It seems like there should be tests for this?

@workingjubilee
Copy link
Member

Hm, not much comment since then...

@a1phyr Can probably accept this with added tests that clarify the behavior we implement internally and the doc-comment on the Read trait that they mention.

@workingjubilee
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 12, 2024
@bors
Copy link
Contributor

bors commented Sep 22, 2024

☔ The latest upstream changes (presumably #130710) made this pull request unmergeable. Please resolve the merge conflicts.

@a1phyr
Copy link
Contributor Author

a1phyr commented Sep 23, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2024
@rust-log-analyzer

This comment has been minimized.

@a1phyr a1phyr force-pushed the fix-read_buf-uses branch 2 times, most recently from f578a8a to 9bf69aa Compare September 23, 2024 20:50
@workingjubilee
Copy link
Member

So the primary effect of this PR is to guard against calls to read_buf having the pathological behavior described? Cool.

@a1phyr
Copy link
Contributor Author

a1phyr commented Sep 27, 2024

Yes!

@workingjubilee
Copy link
Member

Cool.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 28, 2024

📌 Commit d77664b has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 28, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125404 (Fix `read_buf` uses in `std`)
 - rust-lang#130866 (Allow instantiating object trait binder when upcasting)
 - rust-lang#130922 (Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4)
 - rust-lang#130924 (Make clashing_extern_declarations considering generic args for ADT field)
 - rust-lang#130939 (rustdoc: update `ProcMacro` docs section on helper attributes)
 - rust-lang#130940 (Revert space-saving operations)
 - rust-lang#130944 (Allow instantiating trait object binder in ptr-to-ptr casts)
 - rust-lang#130953 (Rename a few tests to make tidy happier)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6e9db86 into rust-lang:master Sep 28, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 28, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 28, 2024
Rollup merge of rust-lang#125404 - a1phyr:fix-read_buf-uses, r=workingjubilee

Fix `read_buf` uses in `std`

Following lib-team decision here: rust-lang#78485 (comment)

Guard against the pathological behavior of both returning an error and performing a read.
@a1phyr a1phyr deleted the fix-read_buf-uses branch September 29, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants