-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Android abstract unix domain sockets AddressKind correction #50079
Conversation
… on Android. Signed-off-by: Nicholas Rishel <[email protected]>
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
r? @sfackler |
Why are you looking for an alternative explanation? The check is for not Linux because BSDs share OSX's behavior. |
…heck. Signed-off-by: Nicholas Rishel <[email protected]>
We have checks that addresses are unnamed as appropriate, and those should be running on Android as well: https://github.com/NickAtAccuPS/rust/blob/da6142c81057342d8d6686ae4078995aab73b5bc/src/libstd/sys/unix/ext/net.rs#L1747 Did you see this not working in practice? Maybe this behavior changed at some point in Android releases? |
Thanks for this PR! Changed the title to WIP so bors actually prevents merging until the prefix is removed from the title |
That's the context I was missing. The problem I'm seeing in the wild is that while libstd doesn't handle creating/pairing an abstract UDS, it does handle them correctly if
Sorry that this wasn't clear from the first comment; I had forgotten that libstd doesn't support abstract socket creation. I don't think the |
Ah, I was thinking that the issue was failing to detect unnamed addresses, not abstract addresses. |
@bors r+ |
📋 Looks like this PR is still in progress, ignoring approval |
@sfackler you need to r+ this again. |
@bors r=sfackler |
📌 Commit da6142c has been approved by |
Android abstract unix domain sockets AddressKind correction The prior check causes abstract unix domain sockets to return AddressKind::Unnamed instead of AddressKind::Abstract on Android. Other than the immediately proceeding comment "macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses" the check as-implemented does not seem to have alternative explanation. I couldn't find an alternative explanation while stepping though git blame. I suspect the AddressKind::Unnamed nonzero check should instead be if macos, length 16, and zeroed array. @sfackler could you comment on this, the code as-is is the same from your initial addition of abstract uds support.
☀️ Test successful - status-appveyor, status-travis |
The prior check causes abstract unix domain sockets to return AddressKind::Unnamed instead of AddressKind::Abstract on Android.
Other than the immediately proceeding comment "macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses" the check as-implemented does not seem to have alternative explanation. I couldn't find an alternative explanation while stepping though git blame. I suspect the AddressKind::Unnamed nonzero check should instead be if macos, length 16, and zeroed array. @sfackler could you comment on this, the code as-is is the same from your initial addition of abstract uds support.