Skip to content

ICE on nightly-2024-05-28 during link stage #125707

@PureWhiteWu

Description

@PureWhiteWu

This ICE both exists on macOS aarch64 and linux amd64.

Code

Internal code, cannot public.

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (da159eb33 2024-05-28)
binary: rustc
commit-hash: da159eb331b27df528185c616b394bb0e1d2a4bd
commit-date: 2024-05-28
host: aarch64-apple-darwin
release: 1.80.0-nightly
LLVM version: 18.1.6

Error output

thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/link.rs:2700:27:
index out of bounds: the len is 308 but the index is 308
stack backtrace:
   0:        0x1019253ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hee5d3add81f8769b
   1:        0x1019699e4 - core::fmt::write::h9dc0a212068c4487
   2:        0x10191b750 - std::io::Write::write_fmt::h1601e9a4a36351ca
   3:        0x101925204 - std::sys_common::backtrace::print::h9535b2af8a100aec
   4:        0x101927810 - std::panicking::default_hook::{{closure}}::hdd85190914d7518f
   5:        0x1019274dc - std::panicking::default_hook::h9798bf625bf54a9e
   6:        0x10b1a8c70 - <alloc[bce90598dd3f4dd3]::boxed::Box<rustc_driver_impl[c4bab6df5b4b3fba]::install_ice_hook::{closure#0}> as core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&dyn for<'a, 'b> core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&'a core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[9e7a2f7b9a3a4c06]::marker::Sync + core[9e7a2f7b9a3a4c06]::marker::Send, &core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo)>>::call
   7:        0x1019281fc - std::panicking::rust_panic_with_hook::hea32a016165e022b
   8:        0x101927c10 - std::panicking::begin_panic_handler::{{closure}}::he55e42119f08366c
   9:        0x101925830 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ec39936dd320eff
  10:        0x101927980 - _rust_begin_unwind
  11:        0x101985260 - core::panicking::panic_fmt::hdd0a8c3eb8088208
  12:        0x1019853f0 - core::panicking::panic_bounds_check::h4e28ad5c5971d664
  13:        0x10af1668c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::linker_with_args
  14:        0x10af0d504 - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_natively
  15:        0x10af0978c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_binary
  16:        0x10aeaa15c - <rustc_codegen_llvm[7dd9e7fd145dc8ba]::LlvmCodegenBackend as rustc_codegen_ssa[b068ff2a868a000c]::traits::backend::CodegenBackend>::link
  17:        0x10b988674 - <rustc_interface[c016e796069c9104]::queries::Linker>::link
  18:        0x10b170e54 - <scoped_tls[7b6fdb05fca54dc0]::ScopedKey<rustc_span[fb448f34252b061b]::SessionGlobals>>::set::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  19:        0x10b17afe8 - rustc_span[fb448f34252b061b]::create_session_globals_then::<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  20:        0x10b179a14 - std[aa6988fe294f8aab]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  21:        0x10b17a0ac - <<std[aa6988fe294f8aab]::thread::Builder>::spawn_unchecked_<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#2} as core[9e7a2f7b9a3a4c06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  22:        0x101930d18 - std::sys::pal::unix::thread::Thread::new::thread_start::h2c9944774d079220
  23:        0x1964baf94 - __pthread_joiner_wake

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

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/purewhite/rust/xxx/rustc-ice-2024-05-29T09_07_49-55168.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED] -C target-cpu=native

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

The file:

rustc-ice-2024-05-29T09_13_04-56076.txt

Backtrace

Backtrace with RUST_BACKTRACE=full:

thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/link.rs:2700:27:
index out of bounds: the len is 308 but the index is 308
stack backtrace:
   0:        0x1058693ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hee5d3add81f8769b
   1:        0x1058ad9e4 - core::fmt::write::h9dc0a212068c4487
   2:        0x10585f750 - std::io::Write::write_fmt::h1601e9a4a36351ca
   3:        0x105869204 - std::sys_common::backtrace::print::h9535b2af8a100aec
   4:        0x10586b810 - std::panicking::default_hook::{{closure}}::hdd85190914d7518f
   5:        0x10586b4dc - std::panicking::default_hook::h9798bf625bf54a9e
   6:        0x10f0ecc70 - <alloc[bce90598dd3f4dd3]::boxed::Box<rustc_driver_impl[c4bab6df5b4b3fba]::install_ice_hook::{closure#0}> as core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&dyn for<'a, 'b> core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&'a core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[9e7a2f7b9a3a4c06]::marker::Sync + core[9e7a2f7b9a3a4c06]::marker::Send, &core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo)>>::call
   7:        0x10586c1fc - std::panicking::rust_panic_with_hook::hea32a016165e022b
   8:        0x10586bc10 - std::panicking::begin_panic_handler::{{closure}}::he55e42119f08366c
   9:        0x105869830 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ec39936dd320eff
  10:        0x10586b980 - _rust_begin_unwind
  11:        0x1058c9260 - core::panicking::panic_fmt::hdd0a8c3eb8088208
  12:        0x1058c93f0 - core::panicking::panic_bounds_check::h4e28ad5c5971d664
  13:        0x10ee5a68c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::linker_with_args
  14:        0x10ee51504 - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_natively
  15:        0x10ee4d78c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_binary
  16:        0x10edee15c - <rustc_codegen_llvm[7dd9e7fd145dc8ba]::LlvmCodegenBackend as rustc_codegen_ssa[b068ff2a868a000c]::traits::backend::CodegenBackend>::link
  17:        0x10f8cc674 - <rustc_interface[c016e796069c9104]::queries::Linker>::link
  18:        0x10f0b4e54 - <scoped_tls[7b6fdb05fca54dc0]::ScopedKey<rustc_span[fb448f34252b061b]::SessionGlobals>>::set::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  19:        0x10f0befe8 - rustc_span[fb448f34252b061b]::create_session_globals_then::<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  20:        0x10f0bda14 - std[aa6988fe294f8aab]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  21:        0x10f0be0ac - <<std[aa6988fe294f8aab]::thread::Builder>::spawn_unchecked_<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#2} as core[9e7a2f7b9a3a4c06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  22:        0x105874d18 - std::sys::pal::unix::thread::Thread::new::thread_start::h2c9944774d079220
  23:        0x1964baf94 - __pthread_joiner_wake

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on May 29, 2024
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 29, 2024
lqd

lqd commented on May 29, 2024

@lqd
Member

This should also be a duplicate of #125474, #125484 and #125646 and will be fixed by #125493

removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 30, 2024
added a commit that references this issue on Jun 6, 2024
1716de0
added a commit that references this issue on Jun 6, 2024
bb2d768
added a commit that references this issue on Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @lqd@PureWhiteWu@saethlin@rustbot

      Issue actions

        ICE on nightly-2024-05-28 during link stage · Issue #125707 · rust-lang/rust