Skip to content

rustc output no longer reproducible if it crashes #145424

@matthiaskrgr

Description

@matthiaskrgr

I tried this code:

pub fn main() { break rust }

command:
RUST_BACKTRACE=0 RUSTC_ICE=0 rustc a.rs

I expected to see this happen:
Equal output on all runs (current behavior on stable 1.89.0 )

Instead, this happened:
thread id that changes every run

--- 1	2025-08-15 08:31:33.671734318 +0200
+++ 2	2025-08-15 08:31:34.932738329 +0200
@@ -21,7 +21,7 @@
   = note: rustc 1.91.0-nightly (898aff704 2025-08-14) running on x86_64-unknown-linux-gnu


-thread 'rustc' (3427246) panicked at compiler/rustc_hir_typeck/src/lib.rs:549:10:
+thread 'rustc' (3427309) panicked at compiler/rustc_hir_typeck/src/lib.rs:549:10:
 Box<dyn Any>
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Meta

since #115746

rustc --version --verbose:

rustc 1.91.0-nightly (898aff704 2025-08-14)
binary: rustc
commit-hash: 898aff704d6f0d00343f21d31b8b9bfac8e43007
commit-date: 2025-08-14
host: x86_64-unknown-linux-gnu
release: 1.91.0-nightly
LLVM version: 21.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions