-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[stable] Fix TcpListener::accept() on x86 Android on stable by disabling the use of accept4. #82475
Conversation
On x86 before Linux 4.3, accept4 is not a separate syscall. Instead, it can be called using `socketcall(SYS_ACCEPT4, ...). Rather than implementing that here, just fall back to `accept`.
|
Nominating for stable backport (though I don't think a stable point release is likely at this time), but reassigning to @joshtriplett who reviewed parts of this in the libc repository. r? @joshtriplett |
This seems like a reasonable approach for a low-impact fix on stable. @bors r+ |
📌 Commit 960cb69 has been approved by |
@bors r- We don't generally want to merge into stable branch currently unless we're intending to make a stable point release, which isn't currently the case. Marking as stable-accepted. |
@Mark-Simulacrum Ah, thanks; I didn't know the procedure there. |
…=joshtriplett [beta] Fix TcpListener::accept() on x86 Android on beta by disabling the use of accept4. This is the same as rust-lang#82475, but for beta. In a nutshell: `TcpListener::accept` is broken on Android x86 on stable and beta because it performs a raw `accept4` syscall, which doesn't exist on that platform. This was originally reported in rust-lang#82400, so you can find more details there. `@rustbot` label +O-android r? `@Mark-Simulacrum`
We won't be making a point release this cycle, so closing. |
TcpListener::accept
is broken on Android x86 on stable and beta because it performs a rawaccept4
syscall, which doesn't exist on that platform. This was originally reported in #82400, so you can find more details there.This PR fixes it by simply falling back to
accept
on x86 Android platforms.Note that for the main branch it would be nice to fix the issue with #82473, rust-lang/libc#2079 and another libc bump. However, if that can't happen before the next beta release, then a similar fix as this PR should be applied on the main branch too.
@rustbot label +O-android
r? @Mark-Simulacrum