Closed
Description
Code
Can not reproduce it with minimized code for now, and the whole repository is private.
Update: Thanks for @buaazp providing a minimal reproduce codebase https://github.com/buaazp/rust-bug.
Meta
rustc --version --verbose
:
rustc 1.84.0-nightly (143ce0920 2024-11-10)
binary: rustc
commit-hash: 143ce0920a2307b19831160a01f06f107610f1b2
commit-date: 2024-11-10
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3
Error output
thread 'rustc' panicked at compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs:168:22:
Failed to encode discriminator in DILocation
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: compiler flags: --crate-type lib -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C debuginfo=2 -Z threads=8 -C target-cpu=native
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `***` (lib)
Backtrace
stack backtrace:
0: 0x7f9ccd2b0ada - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2f1c5db75869eef0
1: 0x7f9ccda47126 - core::fmt::write::h43b2df425572a034
2: 0x7f9ccea4c991 - std::io::Write::write_fmt::h77e35077f9fad7c4
3: 0x7f9ccd2b0932 - std::sys::backtrace::BacktraceLock::print::h0c19526194593f74
4: 0x7f9ccd2b2e36 - std::panicking::default_hook::{{closure}}::h865cf38b8deeb5bb
5: 0x7f9ccd2b2c80 - std::panicking::default_hook::h69c14be83dcb49b3
6: 0x7f9ccc329849 - std[3c0d0ff6ea8c1a1f]::panicking::update_hook::<alloc[f87dac715322685f]::boxed::Box<rustc_driver_impl[83ab483273712ee2]::install_ice_hook::{closure#0}>>::{closure#0}
7: 0x7f9ccd2b3548 - std::panicking::rust_panic_with_hook::h583f6aaba9a390bd
8: 0x7f9ccd2b331a - std::panicking::begin_panic_handler::{{closure}}::h02a363aabf2442f1
9: 0x7f9ccd2b0f89 - std::sys::backtrace::__rust_end_short_backtrace::h84ecae8072aa78ac
10: 0x7f9ccd2b2fdc - rust_begin_unwind
11: 0x7f9cc9d15640 - core::panicking::panic_fmt::h514b8325f5f2609d
12: 0x7f9cca2aa44b - core::option::expect_failed::h3eb9ea9a180694f7
13: 0x7f9cca085139 - rustc_codegen_llvm[163141f4e00b7ecb]::debuginfo::create_scope_map::make_mir_scope
14: 0x7f9cce998306 - rustc_codegen_ssa[b2545927768e4a09]::mir::codegen_mir::<rustc_codegen_llvm[163141f4e00b7ecb]::builder::Builder>
15: 0x7f9cce995b85 - rustc_codegen_llvm[163141f4e00b7ecb]::base::compile_codegen_unit::module_codegen
16: 0x7f9cce96c4d1 - <rustc_codegen_llvm[163141f4e00b7ecb]::LlvmCodegenBackend as rustc_codegen_ssa[b2545927768e4a09]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
17: 0x7f9ccc1619ca - rayon[c458d3a2004a12bf]::iter::plumbing::bridge_producer_consumer::helper::<rayon[c458d3a2004a12bf]::vec::DrainProducer<(usize, &rustc_codegen_ssa[b2545927768e4a09]::assert_module_sources::CguReuse)>, rayon[c458d3a2004a12bf]::iter::filter_map::FilterMapConsumer<rayon[c458d3a2004a12bf]::iter::extend::ListVecConsumer, rustc_data_structures[dd92c1caaaf932d5]::sync::parallel::enabled::par_map<(usize, &rustc_codegen_ssa[b2545927768e4a09]::assert_module_sources::CguReuse), alloc[f87dac715322685f]::vec::Vec<(usize, &rustc_codegen_ssa[b2545927768e4a09]::assert_module_sources::CguReuse)>, (usize, (rustc_codegen_ssa[b2545927768e4a09]::ModuleCodegen<rustc_codegen_llvm[163141f4e00b7ecb]::ModuleLlvm>, u64)), std[3c0d0ff6ea8c1a1f]::collections::hash::map::HashMap<usize, (rustc_codegen_ssa[b2545927768e4a09]::ModuleCodegen<rustc_codegen_llvm[163141f4e00b7ecb]::ModuleLlvm>, u64), rustc_hash[8e68038b4b9c783c]::FxBuildHasher>, rustc_codegen_ssa[b2545927768e4a09]::base::codegen_crate<rustc_codegen_llvm[163141f4e00b7ecb]::LlvmCodegenBackend>::{closure#6}::{closure#1}>::{closure#0}::{closure#0}>>
18: 0x7f9cce96a340 - <rustc_codegen_llvm[163141f4e00b7ecb]::LlvmCodegenBackend as rustc_codegen_ssa[b2545927768e4a09]::traits::backend::CodegenBackend>::codegen_crate
19: 0x7f9ccec310e7 - <rustc_interface[fd324feaaa946fb2]::queries::Linker>::codegen_and_build_linker
20: 0x7f9cce907f6a - rustc_interface[fd324feaaa946fb2]::interface::run_compiler::<core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>, rustc_driver_impl[83ab483273712ee2]::run_compiler::{closure#0}>::{closure#1}
21: 0x7f9ccc33497d - <rayon_core[b1c0e86ef95b0e5b]::job::StackJob<rayon_core[b1c0e86ef95b0e5b]::latch::LatchRef<rayon_core[b1c0e86ef95b0e5b]::latch::LockLatch>, <rayon_core[b1c0e86ef95b0e5b]::registry::Registry>::in_worker_cold<<rayon_core[b1c0e86ef95b0e5b]::thread_pool::ThreadPool>::install<rustc_interface[fd324feaaa946fb2]::util::run_in_thread_pool_with_globals<rustc_interface[fd324feaaa946fb2]::interface::run_compiler<core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>, rustc_driver_impl[83ab483273712ee2]::run_compiler::{closure#0}>::{closure#1}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}::{closure#0}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#0}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>> as rayon_core[b1c0e86ef95b0e5b]::job::Job>::execute
22: 0x7f9ccbe081ae - <rayon_core[b1c0e86ef95b0e5b]::registry::WorkerThread>::wait_until_cold
23: 0x7f9ccbe05c17 - <rayon_core[b1c0e86ef95b0e5b]::registry::ThreadBuilder>::run
24: 0x7f9ccc32c4e6 - <<crossbeam_utils[fa9bdfd2dd3a184c]::thread::ScopedThreadBuilder>::spawn<<rayon_core[b1c0e86ef95b0e5b]::ThreadPoolBuilder>::build_scoped<rustc_interface[fd324feaaa946fb2]::util::run_in_thread_pool_with_globals<rustc_interface[fd324feaaa946fb2]::interface::run_compiler<core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>, rustc_driver_impl[83ab483273712ee2]::run_compiler::{closure#0}>::{closure#1}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[fd324feaaa946fb2]::util::run_in_thread_pool_with_globals<rustc_interface[fd324feaaa946fb2]::interface::run_compiler<core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>, rustc_driver_impl[83ab483273712ee2]::run_compiler::{closure#0}>::{closure#1}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[3a5812f1f6fa4837]::result::Result<(), rustc_span[8e1c5aac56eafb7b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[3a5812f1f6fa4837]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
25: 0x7f9ccc32099e - std[3c0d0ff6ea8c1a1f]::sys::backtrace::__rust_begin_short_backtrace::<alloc[f87dac715322685f]::boxed::Box<dyn core[3a5812f1f6fa4837]::ops::function::FnOnce<(), Output = ()> + core[3a5812f1f6fa4837]::marker::Send>, ()>
26: 0x7f9ccc32c012 - <<std[3c0d0ff6ea8c1a1f]::thread::Builder>::spawn_unchecked_<alloc[f87dac715322685f]::boxed::Box<dyn core[3a5812f1f6fa4837]::ops::function::FnOnce<(), Output = ()> + core[3a5812f1f6fa4837]::marker::Send>, ()>::{closure#1} as core[3a5812f1f6fa4837]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: 0x7f9cce973839 - std::sys::pal::unix::thread::Thread::new::thread_start::h664ba273de986494
28: 0x7f9cc8c10fa3 - start_thread
at /build/reproducible-path/glibc-2.28/nptl/pthread_create.c:486:8
29: 0x7f9cc8b4206f - __GI___clone
at /build/reproducible-path/glibc-2.28/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
30: 0x0 - <unknown>
Metadata
Metadata
Assignees
Labels
Area: Debugging information in compiled programs (DWARF, PDB, etc.)Category: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Status: This issue has no reproduction and needs a reproduction to make progress.Relevant to the compiler team, which will review and decide on the PR/issue.