rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.23k stars 12.7k forks source link

rustc 1.64.0 crashes on armv7-unknown-linux-gnueabihf #106800

Open toni1606 opened 1 year ago

toni1606 commented 1 year ago

Code

The Bug is not reproducible. I started removing code portions and it went away. When i returned to the original codebase the error did not show up anymore.

Meta

rustc --version --verbose:

rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: armv7-unknown-linux-gnueabihf
release: 1.64.0
LLVM version: 14.0.6

Error output

error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: std::backtrace_rs::backtrace::libunwind::trace
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
             2: std::backtrace::Backtrace::create
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/backtrace.rs:328:13
             3: std::backtrace::Backtrace::force_capture
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/backtrace.rs:311:9
             4: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             5: rustc_middle::ty::print::pretty::trimmed_def_paths
             6: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             7: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
             8: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             9: rustc_query_impl::query_callbacks::trimmed_def_paths::force_from_dep_node
            10: <rustc_middle::ty::context::TyCtxt as rustc_query_system::dep_graph::DepContext>::try_force_from_dep_node
            11: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
            12: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green
            13: rustc_codegen_ssa::base::determine_cgu_reuse
            14: <alloc::vec::Vec<rustc_session::cgu_reuse_tracker::CguReuse> as alloc::vec::spec_from_iter::SpecFromIter<rustc_session::cgu_reuse_tracker::CguReuse, core::iter::adapters::map::Map<core::slice::iter::Iter<&rustc_middle::mir::mono::CodegenUnit>, rustc_codegen_ssa::base::codegen_crate<rustc_codegen_llvm::LlvmCodegenBackend>::{closure#4}::{closure#0}>>>::from_iter
            15: <rustc_session::session::Session>::time::<alloc::vec::Vec<rustc_session::cgu_reuse_tracker::CguReuse>, rustc_codegen_ssa::base::codegen_crate<rustc_codegen_llvm::LlvmCodegenBackend>::{closure#4}>
            16: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
            17: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
            18: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
            19: <rustc_interface::queries::Queries>::ongoing_codegen
            20: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
            21: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
            22: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            23: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            24: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            25: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9
            26: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9
            27: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys/unix/thread.rs:108:17
Backtrace

``` thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:1426:13 stack backtrace: 0: 0x7041b3ec - std::backtrace_rs::backtrace::libunwind::trace::h3ecd63e968c83846 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7041b3ec - std::backtrace_rs::backtrace::trace_unsynchronized::h896664514e76113d at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7041b3ec - std::sys_common::backtrace::_print_fmt::h32a493fae6d6e47d at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:66:5 3: 0x7041b3ec - ::fmt::h89340f3152c95102 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:45:22 4: 0x7047cb54 - core::fmt::write::hf26afd71bfef8aed at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/fmt/mod.rs:1198:17 5: 0x7040c044 - std::io::Write::write_fmt::h225e7fbfbeb51eec at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/io/mod.rs:1672:15 6: 0x7041e24c - std::sys_common::backtrace::_print::h13859e44db890857 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:48:5 7: 0x7041e24c - std::sys_common::backtrace::print::hc4a57fb97f305659 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:35:9 8: 0x7041e24c - std::panicking::default_hook::{{closure}}::h996827eba435227c at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:295:22 9: 0x7041dd9c - std::panicking::default_hook::hc99ce20dccce3df7 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:314:9 10: 0x70bd29ec - rustc_driver[7881d5c37187b3a4]::DEFAULT_HOOK::{closure#0}::{closure#0} 11: 0x7041eaf0 - std::panicking::rust_panic_with_hook::h85a0c3f40405fe00 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:702:17 12: 0x7501cce8 - std[da286ee42fadf1f1]::panicking::begin_panic::::{closure#0} 13: 0x7501c274 - std[da286ee42fadf1f1]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> 14: 0x70aace34 - std[da286ee42fadf1f1]::panicking::begin_panic:: 15: 0x7504b114 - std[da286ee42fadf1f1]::panic::panic_any:: 16: 0x7504f710 - ::drop 17: 0x70b57e78 - core[e2a9bb8601623f47]::ptr::drop_in_place:: 18: 0x70b5ca10 - as core[e2a9bb8601623f47]::ops::drop::Drop>::drop 19: 0x70b4abcc - core[e2a9bb8601623f47]::ptr::drop_in_place:: 20: 0x70b47efc - rustc_span[4d7eb4f6f3e21c1e]::with_source_map::, rustc_interface[39094ec9bec4071e]::interface::create_compiler_and_run, rustc_driver[7881d5c37187b3a4]::run_compiler::{closure#1}>::{closure#1}> 21: 0x70b64360 - >::set::, rustc_driver[7881d5c37187b3a4]::run_compiler::{closure#1}>::{closure#0}, core[e2a9bb8601623f47]::result::Result<(), rustc_errors[5bb956a73f090e4a]::ErrorGuaranteed>> 22: 0x70bbd32c - std[da286ee42fadf1f1]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[7881d5c37187b3a4]::run_compiler::{closure#1}>::{closure#0}, core[e2a9bb8601623f47]::result::Result<(), rustc_errors[5bb956a73f090e4a]::ErrorGuaranteed>>::{closure#0}, core[e2a9bb8601623f47]::result::Result<(), rustc_errors[5bb956a73f090e4a]::ErrorGuaranteed>> 23: 0x70b85fc0 - <::spawn_unchecked_, rustc_driver[7881d5c37187b3a4]::run_compiler::{closure#1}>::{closure#0}, core[e2a9bb8601623f47]::result::Result<(), rustc_errors[5bb956a73f090e4a]::ErrorGuaranteed>>::{closure#0}, core[e2a9bb8601623f47]::result::Result<(), rustc_errors[5bb956a73f090e4a]::ErrorGuaranteed>>::{closure#1} as core[e2a9bb8601623f47]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 24: 0x70429278 - as core::ops::function::FnOnce>::call_once::he24fa73697888656 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9 25: 0x70429278 - as core::ops::function::FnOnce>::call_once::h39d16b8bb7454122 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9 26: 0x70429278 - std::sys::unix::thread::Thread::new::thread_start::hca3b91966e7d4fc2 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys/unix/thread.rs:108:17 note: rustc 1.64.0 (a55dd71d5 2022-09-19) running on armv7-unknown-linux-gnueabihf note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental note: some of the compiler flags provided by cargo are hidden ```

kpreid commented 10 months ago

Relabeling issues which don't have a runnable reproduction (as opposed to having a non-minimized one) to the new label S-needs-repro. @rustbot label +S-needs-repro -E-needs-mcve