New segfault in binaries built for musl targets

Aperta
#5,778 24 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, rust

Direzione di ricerca

The failure is a SIGSEGV in libc test binaries built for arm-unknown-linux-musleabihf under qemu, reproduced with cargo test --target arm-unknown-linux-musleabihf -p libc. The bisection points at rust-lang/rust PR 166191, so the work is in the compiler change, not this crate. Start by rerunning the bisect command against the libc-test ctest target. Done means identifying the regressing change and a fix or workaround that makes the musl tests pass in CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

C-bug O-musl
Code

No simple reproducer, but seen with:

root@1648141b76fd:~/checkout# cargo test --target arm-unknown-linux-musleabihf -p libc
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.09s
     Running unittests src/lib.rs (target/arm-unknown-linux-musleabihf/debug/build/libc/e8b5e2f453d9890c/out/libc-e8b5e2f453d9890c)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
error: test failed, to rerun pass `-p libc --lib`

Caused by:
  process didn't exit successfully: `qemu-arm -L /musl-arm /root/checkout/target/arm-unknown-linux-musleabihf/debug/build/libc/e8b5e2f453d9890c/out/libc-e8b5e2f453d9890c` (signal: 11, SIGSEGV: invalid memory reference)

on the latest at https://github.com/rust-lang/libc.

This is failing reliably in CI, e.g. https://github.com/rust-lang/libc/actions/runs/45410043147/job/138502869124?pr=5776.

Bisection
RESULT: 277240238554297f93fa9ee3c7643dfa03ccbbb4, ===> Compile error

searched toolchains 137d1d49458b73b7b85d2c1599d8730886d65e47 through 20fe935d50367c0ff8872c2ebfa050c5c99d9201

********************************************************************************
Regression in 277240238554297f93fa9ee3c7643dfa03ccbbb4
********************************************************************************

Attempting to search unrolled perf builds
Found commits ["63eafa4c", "6a86caea", "8d6c5110", "04a9ff0d", "393ed477", "9c1f76af"]
installing 63eafa4c189b1479a69a5d1408dcdc2a74f3098b
rust-std-nightly-aarch64-unknown-linux-gnu: 31.77 MB / 31.77 MB [=================================================================================================================================] 100.00 % 8.34 MB/s ERROR: error: Could not find 63eafa4c189b1479a69a5d1408dcdc2a74f3098b; url: https://ci-artifacts.rust-lang.org/rustc-builds/63eafa4c189b1479a69a5d1408dcdc2a74f3098b/rust-std-nightly-arm-unknown-linux-musleabihf.tar.gz
==================================================================================
= Please file this regression report on the rust-lang/rust GitHub repository     =
=        New issue: https://github.com/rust-lang/rust/issues/new                 =
=     Known issues: https://github.com/rust-lang/rust/issues                     =
= Copy and paste the text below into the issue report thread.  Thanks!           =
==================================================================================

searched nightlies: from nightly-2026-11-01 to nightly-2026-11-24
regressed nightly: nightly-2026-11-24
searched commit range: https://github.com/rust-lang/rust/compare/137d1d49458b73b7b85d2c1599d8730886d65e47...20fe935d50367c0ff8872c2ebfa050c5c99d9201
regressed commit: https://github.com/rust-lang/rust/commit/277240238554297f93fa9ee3c7643dfa03ccbbb4
bisected with cargo-bisect-rustc v0.6.12

Host triple: aarch64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --target arm-unknown-linux-musleabihf --preserve --start=2026-11-01 -v -- test -p libc-test --test ctest

Seems to point at https://github.com/rust-lang/rust/pull/166191, cc @bjorn3 @Gelbpunkt

Lingua principale
Rust
Stelle
2.7k
Fork
1.4k
Merge medio
3g 2h
PR unite (30g)
45

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-lang/libc

Tutte le issue di rust-lang/libc

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.