-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-parallel-compilerArea: parallel compilerArea: parallel compilerA-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.Category: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
I tried this code:
use std::thread;
fn _main() {
let _t1 = thread::spawn(|| {
for _ in 0..100 {
println!("test");
}
});
}compiled with RUSTFLAGS="" rustc a.rs -Zthreads=3 --crate-type lib -Clink-dead-code=true -Copt-level=0 -Ccodegen-units=1 ; md5sum liba.rlib
I expected to see this happen: explanation
same checksums all the time
Instead, this happened: explanation
different checksums:
ddeb820dec9e3451d3353aa1041e4ef3 liba.rlib
0604d96b3340f2b6e3bed389738515c9 liba.rlib
0604d96b3340f2b6e3bed389738515c9 liba.rlib
ddeb820dec9e3451d3353aa1041e4ef3 liba.rlib
0604d96b3340f2b6e3bed389738515c9 liba.rlib
0604d96b3340f2b6e3bed389738515c9 liba.rlib
3c3905784182c1b6958da68edba17c5d liba.rlib
ddeb820dec9e3451d3353aa1041e4ef3 liba.rlib
Meta
rustc --version --verbose:
rustc 1.94.0-nightly (1107bbac4 2025-12-26)
binary: rustc
commit-hash: 1107bbac4b303d49c3e67a2ec62710902bf4b341
commit-date: 2025-12-26
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8
mati865 and saethlin
Metadata
Metadata
Assignees
Labels
A-parallel-compilerArea: parallel compilerArea: parallel compilerA-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.Category: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.