rust-lang / rust-lang/rust

Compiler Requested Report

Open
#147,203 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-LTO C-bug I-ICE O-windows S-needs-info T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

###Code

// Not available — this ICE occurred during compilation in an incremental + LTO build.
// The panic happened during the “optimize module” phase, before linking.
// If needed, code/test modules that triggered this might be added after minimization.

Meta
rustc --version --verbose:

rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-pc-windows-msvc
release: 1.88.0
LLVM version: <auto-filled if present>

Error output

thread 'optimize module aqyix2govsci2tmppynqqxv27' panicked at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc\compiler\rustc_codegen_ssa\src\back\write.rs:925:21:
Error writing pre-lto-bitcode file `\\?\D:\Projects\ContentForgePro\target\release\incremental\test_lifecycle_management-3pjubmjqa5pb4\s-hblyc62sb1-1wiht1n-working\aqyix2govsci2tmppynqqxv27.pre-lto.bc`: A device which does not exist was specified. (os error 433)
...
thread 'optimize module ep4sc5m5nuhgyiclijtw10p40' panicked at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc\compiler\rustc_codegen_ssa\src\back\write.rs:925:21:
Error writing pre-lto-bitcode file `\\?\D:\Projects\ContentForgePro\target\release\incremental\test_direct_lifecycle_wasm-0misob3d4yfqn\s-hblyc6gwsu-083tkjw-working\ep4sc5m5nuhgyiclijtw10p40.pre-lto.bc`: A device which does not exist was specified. (os error 433)
...
error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: [https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md](https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md)

note: rustc 1.88.0 (6b00bc388 2025-06-23) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type bin -C opt-level=3 -C panic=abort -C lto -C codegen-units=1 -C linker=rust-lld.exe -C incremental=[REDACTED] -C strip=debuginfo -C link-arg=-fuse-ld=lld
note: some of the compiler flags provided by cargo are hidden
...
rustc-LLVM ERROR: IO failure on output stream: invalid argument
    Building [=====================> ] 1713/1726: ...
Backtrace

stack backtrace:
   0:     0x7ffaf0b0a9c2 - std::backtrace_rs::backtrace::win64::trace
   1:     0x7ffaf0b0a9c2 - std::backtrace_rs::backtrace::trace_unsynchronized
   2:     0x7ffaf0b0a9c2 - std::sys::backtrace::_print_fmt
   3:     0x7ffaf0b0a9c2 - std::sys::backtrace::impl$0::print::impl$0::fmt
   4:     0x7ffaf0b3d18b - core::fmt::rt::Argument::fmt
   5:     0x7ffaf0b3d18b - core::fmt::write
   6:     0x7ffaf0b00b17 - std::io::default_write_fmt
   7:     0x7ffaf0b00b17 - std::io::Write::write_fmt<std::sys::stdio::windows::Stderr>
   8:     0x7ffaf0b0a805 - std::sys::backtrace::BacktraceLock::print
   9:     0x7ffaf0b1045a - std::panicking::default_hook::closure$0
  10:     0x7ffaf0b101f0 - std::panicking::default_hook
  ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the panic location in compiler/rustc_codegen_ssa/src/back/write.rs:925 and the reported incremental plus LTO flags on x86_64-pc-windows-msvc. Reproduce the failure using the compiler version and configuration shown, then minimize the unavailable triggering code or test modules. Done means a minimal reproducer and a confirmed compiler fix or diagnosis for the pre-LTO bitcode write failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.