-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Recent changes to posix spawn seems to cause a segfault in std::process::Command #3677
Comments
+1 we're also seeing segfaults after updating libc to 0.2.154 with code that uses posix_spawn directly. |
Edit: Same conclusion as in #3608 Linux unsafe {
let mut attrs = <MaybeUninit<*mut c_void>>::uninit();
let ptr = attrs.as_mut_ptr();
memset(ptr as _, 0, size_of::<libc::posix_spawnattr_t>());
} On Android (with Bionic libc), I propose maintainers to yank libc v0.2.154. |
#3690 has been merged, and |
Fixes: rust-lang#3709 Fixes: rust-lang#3608 Fixes: rust-lang#3677 Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com> [resolved conflict, update commit message - Trevor] (apply <rust-lang#3690> to `main`) (cherry picked from commit b2b2fd7) Signed-off-by: Trevor Gross <tmgross@umich.edu>
Hi.
The CI of rustc_codegen_gcc suddendly started failing.
After investigation, it seems to be caused by recent changes to libc, regarding posix spawn stuff (so possibly related to this change).
My target triple is:
x86_64-unknown-linux-gnu
.Here's the code (inspired by
std::process::Command
) that works with libc 0.2.153, but segfaults with 0.2.154 (it doesn't reproduce in the playground since it still uses version 0.2.153):It seems there's stack corruption.
It could be interesting to run the std tests in the CI to check if changes to libc breaks anything.
Thanks.
Edit: Pinning to the version 0.2.153 fixes the CI in rustc_codegen_gcc: rust-lang/rustc_codegen_gcc#512
The text was updated successfully, but these errors were encountered: