Change everything returning libc::sockaddr_storage to use an &mut out-...#16251
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 4, 2014
Merged
Change everything returning libc::sockaddr_storage to use an &mut out-...#16251bors merged 1 commit intorust-lang:masterfrom
libc::sockaddr_storage to use an &mut out-...#16251bors merged 1 commit intorust-lang:masterfrom
Conversation
src/libnative/io/net.rs
Outdated
Member
There was a problem hiding this comment.
I believe the current conventions for a return type on the next line is to line up the arrow with the name of the first argument.
Contributor
Author
There was a problem hiding this comment.
Thanks @alexcrichton, I was very unsure of this. I'll repush.
…ut-ptr instead The BSD socket code does some cast tricks with the `libc::sockaddr*` structs, which causes useful data to be stored in struct padding. Since Load/Store instructions do not copy struct padding, this makes these structures dangerous to pass or return by value. In particular, rust-lang#15763 changes return semantics so that a Load instruction is used, breaking the TCP code. Once this PR is merged, that one should merge without error.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 8, 2024
Add description to span crate manifest CC https://github.com/rust-lang/rust-analyzer/actions/runs/7408827766/job/20157836624
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replacement for PR #16208 (make sockaddr* struct padding explicit) to make PR #15763 (fix nested returns) merge without breaking TCP code.