Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: failed to normalize, generic_const_exprs #110630

Closed
matthiaskrgr opened this issue Apr 20, 2023 · 7 comments
Closed

ICE: failed to normalize, generic_const_exprs #110630

matthiaskrgr opened this issue Apr 20, 2023 · 7 comments
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features This issue requires the use of incomplete features. requires-nightly This issue requires a nightly compiler in some way. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Apr 20, 2023

Code

#![feature(generic_const_exprs)]

use std::ops::Mul;

pub trait Indices<const N: usize> {
    const NUM_ELEMS: usize = I::NUM_ELEMS * N;
}

pub trait Concat<J> {
    type Output;
}

pub struct Tensor<I: Indices<N>, const N: usize>
where
    [u8; I::NUM_ELEMS]: Sized, {}

impl<I: Indices<N>, J: Indices<N>, const N: usize> Mul<Tensor<J, N>> for Tensor<I, N>
where
    I: Concat<T>,
    <I as Concat<J>>::Output: Indices<N>,
    [u8; I::NUM_ELEMS]: Sized,
    [u8; J::NUM_ELEMS]: Sized,
    [u8; <I as Concat<J>>::Output::NUM_ELEMS]: Sized,
{
    type Output = Tensor<<I as Concat<J>>::Output, N>;
}

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (39c6804b9 2023-04-19)
binary: rustc
commit-hash: 39c6804b92aa202369e402525cee329556bc1db0
commit-date: 2023-04-19
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

yes
Backtrace

error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize <I as Concat<J>>::Output, maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/39c6804b92aa202369e402525cee329556bc1db0/compiler/rustc_errors/src/lib.rs:1643:9
stack backtrace:
   0:     0x7f6af5168d43 - std::backtrace_rs::backtrace::libunwind::trace::h2a7e49770a0c8eb3
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6af5168d43 - std::backtrace_rs::backtrace::trace_unsynchronized::h6a543332a97578fa
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6af5168d43 - std::sys_common::backtrace::_print_fmt::heb3e5fffa7940917
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6af5168d43 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h810a6e7cce2ac2e2
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6af51c9daf - core::fmt::write::h9ad46b7c2a3eb976
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/core/src/fmt/mod.rs:1254:17
   5:     0x7f6af515bd01 - std::io::Write::write_fmt::h1c9baacb87e6b9c9
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/io/mod.rs:1698:15
   6:     0x7f6af5168b55 - std::sys_common::backtrace::_print::hca33eaa945a8a7ce
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f6af5168b55 - std::sys_common::backtrace::print::h00199beaff62c71c
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f6af516b807 - std::panicking::default_hook::{{closure}}::hd62eb02492041726
   9:     0x7f6af516b5f5 - std::panicking::default_hook::hb077d6100095f68a
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/panicking.rs:288:9
  10:     0x7f6af84416e5 - <rustc_driver_impl[fc06c256dc1cd1a9]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[87dac7cd678aec56]::ops::function::FnOnce<(&core[87dac7cd678aec56]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f6af516bf45 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h616a4bdc344416e6
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1976:9
  12:     0x7f6af516bf45 - std::panicking::rust_panic_with_hook::hd2d604a080396eb9
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/panicking.rs:695:13
  13:     0x7f6af89111a1 - std[ca44723e5ea5c648]::panicking::begin_panic::<rustc_errors[340b75cb71735eab]::ExplicitBug>::{closure#0}
  14:     0x7f6af890f4f6 - std[ca44723e5ea5c648]::sys_common::backtrace::__rust_end_short_backtrace::<std[ca44723e5ea5c648]::panicking::begin_panic<rustc_errors[340b75cb71735eab]::ExplicitBug>::{closure#0}, !>
  15:     0x7f6af896b2b6 - std[ca44723e5ea5c648]::panicking::begin_panic::<rustc_errors[340b75cb71735eab]::ExplicitBug>
  16:     0x7f6af8995cb6 - <rustc_errors[340b75cb71735eab]::HandlerInner>::bug::<&alloc[27ecb065d74dda4e]::string::String>
  17:     0x7f6af8995980 - <rustc_errors[340b75cb71735eab]::Handler>::bug::<&alloc[27ecb065d74dda4e]::string::String>
  18:     0x7f6af89688db - rustc_middle[6b53c1a405df2db5]::util::bug::opt_span_bug_fmt::<rustc_span[35742d543528875]::span_encoding::Span>::{closure#0}
  19:     0x7f6af89680da - rustc_middle[6b53c1a405df2db5]::ty::context::tls::with_opt::<rustc_middle[6b53c1a405df2db5]::util::bug::opt_span_bug_fmt<rustc_span[35742d543528875]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  20:     0x7f6af89680a6 - rustc_middle[6b53c1a405df2db5]::ty::context::tls::with_context_opt::<rustc_middle[6b53c1a405df2db5]::ty::context::tls::with_opt<rustc_middle[6b53c1a405df2db5]::util::bug::opt_span_bug_fmt<rustc_span[35742d543528875]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  21:     0x7f6af65d42dd - rustc_middle[6b53c1a405df2db5]::util::bug::bug_fmt
  22:     0x7f6af68eb46f - <rustc_middle[6b53c1a405df2db5]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[7988ade75723acf4]::fold::TypeFolder<rustc_middle[6b53c1a405df2db5]::ty::context::TyCtxt>>::fold_ty
  23:     0x7f6af77e0e1d - <&rustc_middle[6b53c1a405df2db5]::ty::list::List<rustc_middle[6b53c1a405df2db5]::ty::subst::GenericArg> as rustc_type_ir[7988ade75723acf4]::fold::TypeFoldable<rustc_middle[6b53c1a405df2db5]::ty::context::TyCtxt>>::fold_with::<rustc_middle[6b53c1a405df2db5]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
  24:     0x7f6af6bf8eb1 - rustc_ty_utils[bf48d55383bd79c7]::instance::inner_resolve_instance
  25:     0x7f6af6953df1 - rustc_query_system[cc3f2816497b0dda]::query::plumbing::try_execute_query::<rustc_query_impl[d5b511e0af106fac]::queries::resolve_instance, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>
  26:     0x7f6af68b00cd - <rustc_middle[6b53c1a405df2db5]::ty::instance::Instance>::resolve_opt_const_arg
  27:     0x7f6af660a3f9 - <rustc_middle[6b53c1a405df2db5]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  28:     0x7f6af8791853 - <rustc_infer[88dfd77dfcf8c680]::infer::InferCtxt>::const_eval_resolve
  29:     0x7f6af8790061 - <rustc_infer[88dfd77dfcf8c680]::infer::InferCtxt>::try_const_eval_resolve
  30:     0x7f6af65abdfe - <rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::FulfillProcessor as rustc_data_structures[a36227c7e9b5ca0d]::obligation_forest::ObligationProcessor>::process_obligation
  31:     0x7f6af659be49 - <rustc_data_structures[a36227c7e9b5ca0d]::obligation_forest::ObligationForest<rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::FulfillProcessor>
  32:     0x7f6af6e46d70 - <rustc_trait_selection[c5baa1ad5e4ebced]::traits::engine::ObligationCtxt>::select_all_or_error
  33:     0x7f6af90ab583 - <rustc_infer[88dfd77dfcf8c680]::infer::InferCtxt>::probe::<bool, <rustc_trait_selection[c5baa1ad5e4ebced]::traits::const_evaluatable::satisfied_from_param_env::Visitor as rustc_type_ir[7988ade75723acf4]::visit::TypeVisitor<rustc_middle[6b53c1a405df2db5]::ty::context::TyCtxt>>::visit_const::{closure#0}>
  34:     0x7f6af8ff9285 - <rustc_trait_selection[c5baa1ad5e4ebced]::traits::const_evaluatable::satisfied_from_param_env::Visitor as rustc_type_ir[7988ade75723acf4]::visit::TypeVisitor<rustc_middle[6b53c1a405df2db5]::ty::context::TyCtxt>>::visit_const
  35:     0x7f6af8ff909f - rustc_trait_selection[c5baa1ad5e4ebced]::traits::const_evaluatable::satisfied_from_param_env
  36:     0x7f6af6614df8 - rustc_trait_selection[c5baa1ad5e4ebced]::traits::const_evaluatable::is_const_evaluatable
  37:     0x7f6af65a7bf1 - <rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::FulfillProcessor as rustc_data_structures[a36227c7e9b5ca0d]::obligation_forest::ObligationProcessor>::process_obligation
  38:     0x7f6af659be49 - <rustc_data_structures[a36227c7e9b5ca0d]::obligation_forest::ObligationForest<rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[c5baa1ad5e4ebced]::traits::fulfill::FulfillProcessor>
  39:     0x7f6af6e46d70 - <rustc_trait_selection[c5baa1ad5e4ebced]::traits::engine::ObligationCtxt>::select_all_or_error
  40:     0x7f6af8587ce1 - <rustc_hir_analysis[b76cf653628f06f0]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[90ff4a02f3a736a3]::intravisit::Visitor>::visit_ty
  41:     0x7f6af85877f1 - rustc_hir_analysis[b76cf653628f06f0]::hir_wf_check::diagnostic_hir_wf_check
  42:     0x7f6af8d5f565 - <std[ca44723e5ea5c648]::thread::local::LocalKey<core[87dac7cd678aec56]::cell::Cell<*const ()>>>::with::<rustc_middle[6b53c1a405df2db5]::ty::context::tls::enter_context<rustc_query_system[cc3f2816497b0dda]::query::plumbing::execute_job_non_incr<rustc_query_impl[d5b511e0af106fac]::queries::diagnostic_hir_wf_check, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[6b53c1a405df2db5]::query::erase::Erased<[u8; 8usize]>>::{closure#0}, rustc_middle[6b53c1a405df2db5]::query::erase::Erased<[u8; 8usize]>>
  43:     0x7f6af8cd61ba - rustc_query_system[cc3f2816497b0dda]::query::plumbing::try_execute_query::<rustc_query_impl[d5b511e0af106fac]::queries::diagnostic_hir_wf_check, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>
  44:     0x7f6af8dff20f - <rustc_query_impl[d5b511e0af106fac]::Queries as rustc_middle[6b53c1a405df2db5]::ty::query::QueryEngine>::diagnostic_hir_wf_check
  45:     0x7f6af90ca486 - <rustc_infer[88dfd77dfcf8c680]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[c5baa1ad5e4ebced]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
  46:     0x7f6af90d46d1 - <rustc_infer[88dfd77dfcf8c680]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[c5baa1ad5e4ebced]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  47:     0x7f6af90c7770 - <rustc_infer[88dfd77dfcf8c680]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[c5baa1ad5e4ebced]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
  48:     0x7f6af7272301 - rustc_hir_analysis[b76cf653628f06f0]::check::wfcheck::check_associated_item
  49:     0x7f6af726b002 - rustc_hir_analysis[b76cf653628f06f0]::check::wfcheck::check_well_formed
  50:     0x7f6af668371e - rustc_query_system[cc3f2816497b0dda]::query::plumbing::try_execute_query::<rustc_query_impl[d5b511e0af106fac]::queries::check_well_formed, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>
  51:     0x7f6af75855b1 - rustc_data_structures[a36227c7e9b5ca0d]::sync::par_for_each_in::<&[rustc_hir[90ff4a02f3a736a3]::hir::ImplItemId], <rustc_middle[6b53c1a405df2db5]::hir::ModuleItems>::par_impl_items<rustc_hir_analysis[b76cf653628f06f0]::check::wfcheck::check_mod_type_wf::{closure#1}>::{closure#0}>
  52:     0x7f6af75850ba - rustc_hir_analysis[b76cf653628f06f0]::check::wfcheck::check_mod_type_wf
  53:     0x7f6af7a75481 - rustc_query_system[cc3f2816497b0dda]::query::plumbing::try_execute_query::<rustc_query_impl[d5b511e0af106fac]::queries::check_mod_type_wf, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>
  54:     0x7f6af7a750a9 - <rustc_query_impl[d5b511e0af106fac]::Queries as rustc_middle[6b53c1a405df2db5]::ty::query::QueryEngine>::check_mod_type_wf
  55:     0x7f6af780d387 - rustc_data_structures[a36227c7e9b5ca0d]::sync::par_for_each_in::<&[rustc_hir[90ff4a02f3a736a3]::hir_id::OwnerId], <rustc_middle[6b53c1a405df2db5]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[b76cf653628f06f0]::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  56:     0x7f6af7809c7d - rustc_hir_analysis[b76cf653628f06f0]::check_crate
  57:     0x7f6af7803bad - rustc_interface[582898756836a6b1]::passes::analysis
  58:     0x7f6af7ba3702 - rustc_query_system[cc3f2816497b0dda]::query::plumbing::try_execute_query::<rustc_query_impl[d5b511e0af106fac]::queries::analysis, rustc_query_impl[d5b511e0af106fac]::plumbing::QueryCtxt>
  59:     0x7f6af7ba3410 - <rustc_query_impl[d5b511e0af106fac]::Queries as rustc_middle[6b53c1a405df2db5]::ty::query::QueryEngine>::analysis
  60:     0x7f6af7a640e6 - <std[ca44723e5ea5c648]::thread::local::LocalKey<core[87dac7cd678aec56]::cell::Cell<*const ()>>>::with::<rustc_middle[6b53c1a405df2db5]::ty::context::tls::enter_context<<rustc_middle[6b53c1a405df2db5]::ty::context::GlobalCtxt>::enter<rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>
  61:     0x7f6af763dca8 - <rustc_interface[582898756836a6b1]::interface::Compiler>::enter::<rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}::{closure#2}, core[87dac7cd678aec56]::result::Result<core[87dac7cd678aec56]::option::Option<rustc_interface[582898756836a6b1]::queries::Linker>, rustc_span[35742d543528875]::ErrorGuaranteed>>
  62:     0x7f6af7637caf - rustc_span[35742d543528875]::set_source_map::<core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>, rustc_interface[582898756836a6b1]::interface::run_compiler<core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>, rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  63:     0x7f6af76378c8 - <scoped_tls[73fb7a08bc8a4c85]::ScopedKey<rustc_span[35742d543528875]::SessionGlobals>>::set::<rustc_interface[582898756836a6b1]::interface::run_compiler<core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>, rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}>::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>
  64:     0x7f6af7636edb - std[ca44723e5ea5c648]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[582898756836a6b1]::util::run_in_thread_pool_with_globals<rustc_interface[582898756836a6b1]::interface::run_compiler<core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>, rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}>::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>
  65:     0x7f6af7d09431 - <<std[ca44723e5ea5c648]::thread::Builder>::spawn_unchecked_<rustc_interface[582898756836a6b1]::util::run_in_thread_pool_with_globals<rustc_interface[582898756836a6b1]::interface::run_compiler<core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>, rustc_driver_impl[fc06c256dc1cd1a9]::run_compiler::{closure#1}>::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[87dac7cd678aec56]::result::Result<(), rustc_span[35742d543528875]::ErrorGuaranteed>>::{closure#1} as core[87dac7cd678aec56]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  66:     0x7f6af51763d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haab69effe0fa19e3
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1962:9
  67:     0x7f6af51763d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb0775fd74e9e7829
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1962:9
  68:     0x7f6af51763d5 - std::sys::unix::thread::Thread::new::thread_start::h0e7436fc32c0c985
                               at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys/unix/thread.rs:108:17
  69:     0x7f6af4f10bb5 - <unknown>
  70:     0x7f6af4f92d90 - <unknown>
  71:                0x0 - <unknown>

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: rustc 1.71.0-nightly (39c6804b9 2023-04-19) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [resolve_instance] resolving instance `<<I as Concat<J>>::Output as Indices<N>>::NUM_ELEMS`
#1 [diagnostic_hir_wf_check] performing HIR wf-checking for predicate `Binder(TraitPredicate(<I as Concat<J>>, polarity:Positive), [])` at item `Ty(DefId(0:21 ~ treereduce[952b]::{impl#0}::Output))`
#2 [check_well_formed] checking that `<impl at treereduce.rs:17:1: 17:86>::Output` is well-formed
#3 [check_mod_type_wf] checking that types are well-formed in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 12 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0392, E0412, E0433, E0601.
For more information about an error, try `rustc --explain E0277`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. F-generic_const_exprs `#![feature(generic_const_exprs)]` labels Apr 20, 2023
@matthiaskrgr
Copy link
Member Author

proly related to #83288

@pbdeuchler
Copy link

I'm getting this as well with the bitvec crate on nightly

Backtrace

#0 92.22 error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize alloc::raw_vec::RawVec<<T as store::BitStore>::Mem>, maybe try to call `try_normalize_erasing_regions` instead
#0 92.22
#0 92.22 thread 'rustc' panicked at 'Box<dyn Any>', /rustc/39c6804b92aa202369e402525cee329556bc1db0/compiler/rustc_errors/src/lib.rs:1643:9
#0 92.22 stack backtrace:
#0 92.23    0:     0xffff7f92d174 - std::backtrace_rs::backtrace::libunwind::trace::h12be91c7b6627c6d
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
#0 92.24    1:     0xffff7f92d174 - std::backtrace_rs::backtrace::trace_unsynchronized::h4bdab7ec283fe3be
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
#0 92.24    2:     0xffff7f92d174 - std::sys_common::backtrace::_print_fmt::he3e23b7445a93ab7
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:65:5
#0 92.24    3:     0xffff7f92d174 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0b8e6c555078be05
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:44:22
#0 92.24    4:     0xffff7f984638 - core::fmt::write::h552f8b618807d728
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/core/src/fmt/mod.rs:1254:17
#0 92.24    5:     0xffff7f922548 - std::io::Write::write_fmt::h152cf3f5e88b0a25
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/io/mod.rs:1698:15
#0 92.24    6:     0xffff7f92cfc8 - std::sys_common::backtrace::_print::h9f38c7a813da777d
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:47:5
#0 92.24    7:     0xffff7f92cfc8 - std::sys_common::backtrace::print::hbf1753281d02ce4f
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys_common/backtrace.rs:34:9
#0 92.24    8:     0xffff7f92f8ec - std::panicking::default_hook::{{closure}}::hb1ad0964de2ba130
#0 92.24    9:     0xffff7f92f6dc - std::panicking::default_hook::h7cdfed1a64e285f9
#0 92.24                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/panicking.rs:288:9
#0 92.26   10:     0xffff806c6a64 - rustc_driver_impl[834bde73645836c3]::DEFAULT_HOOK::{closure#0}::{closure#0}
#0 92.26   11:     0xffff7f92ff68 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hed64ebfa41cbc02a
#0 92.26                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1976:9
#0 92.27   12:     0xffff7f92ff68 - std::panicking::rust_panic_with_hook::h317e3aa4f76fcfc7
#0 92.27                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/panicking.rs:695:13
#0 92.27   13:     0xffff851795e8 - std[ee9b954e96d984cc]::panicking::begin_panic::<rustc_errors[f6729713c501e706]::ExplicitBug>::{closure#0}
#0 92.27   14:     0xffff8517723c - std[ee9b954e96d984cc]::sys_common::backtrace::__rust_end_short_backtrace::<std[ee9b954e96d984cc]::panicking::begin_panic<rustc_errors[f6729713c501e706]::ExplicitBug>::{closure#0}, !>
#0 92.27   15:     0xffff805a4c34 - std[ee9b954e96d984cc]::panicking::begin_panic::<rustc_errors[f6729713c501e706]::ExplicitBug>
#0 92.27   16:     0xffff852545e8 - <rustc_errors[f6729713c501e706]::HandlerInner>::bug::<&alloc[73ea3e3568c2066d]::string::String>
#0 92.27   17:     0xffff85254298 - <rustc_errors[f6729713c501e706]::Handler>::bug::<&alloc[73ea3e3568c2066d]::string::String>
#0 92.27   18:     0xffff852198a0 - rustc_middle[8ab10741ae762805]::util::bug::opt_span_bug_fmt::<rustc_span[566bd16bcf1e2cd5]::span_encoding::Span>::{closure#0}
#0 92.27   19:     0xffff85217248 - rustc_middle[8ab10741ae762805]::ty::context::tls::with_opt::<rustc_middle[8ab10741ae762805]::util::bug::opt_span_bug_fmt<rustc_span[566bd16bcf1e2cd5]::span_encoding::Span>::{closure#0}, !>::{closure#0}
#0 92.27   20:     0xffff85217214 - rustc_middle[8ab10741ae762805]::ty::context::tls::with_context_opt::<rustc_middle[8ab10741ae762805]::ty::context::tls::with_opt<rustc_middle[8ab10741ae762805]::util::bug::opt_span_bug_fmt<rustc_span[566bd16bcf1e2cd5]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
#0 92.27   21:     0xffff805a4ef4 - rustc_middle[8ab10741ae762805]::util::bug::bug_fmt
#0 92.27   22:     0xffff851e7404 - <rustc_middle[8ab10741ae762805]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>::normalize_generic_arg_after_erasing_regions
#0 92.27   23:     0xffff851e7444 - <rustc_middle[8ab10741ae762805]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[91f2e8daaf6907fc]::fold::TypeFolder<rustc_middle[8ab10741ae762805]::ty::context::TyCtxt>>::fold_ty
#0 92.27   24:     0xffff83783a30 - <core[2d48004a85dc5565]::iter::adapters::map::Map<core[2d48004a85dc5565]::iter::adapters::enumerate::Enumerate<core[2d48004a85dc5565]::slice::iter::Iter<rustc_middle[8ab10741ae762805]::ty::FieldDef>>, <rustc_mir_dataflow[509d19dec06e5cb0]::elaborate_drops::DropCtxt<rustc_mir_transform[2a96cee0d5989ce9]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}> as core[2d48004a85dc5565]::iter::traits::iterator::Iterator>::fold::<(), core[2d48004a85dc5565]::iter::traits::iterator::Iterator::for_each::call<(rustc_middle[8ab10741ae762805]::mir::syntax::Place, core[2d48004a85dc5565]::option::Option<()>), <alloc[73ea3e3568c2066d]::vec::Vec<(rustc_middle[8ab10741ae762805]::mir::syntax::Place, core[2d48004a85dc5565]::option::Option<()>)>>::extend_trusted<core[2d48004a85dc5565]::iter::adapters::map::Map<core[2d48004a85dc5565]::iter::adapters::enumerate::Enumerate<core[2d48004a85dc5565]::slice::iter::Iter<rustc_middle[8ab10741ae762805]::ty::FieldDef>>, <rustc_mir_dataflow[509d19dec06e5cb0]::elaborate_drops::DropCtxt<rustc_mir_transform[2a96cee0d5989ce9]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>::{closure#0}>::{closure#0}>
#0 92.27   25:     0xffff838b3d04 - <alloc[73ea3e3568c2066d]::vec::Vec<(rustc_middle[8ab10741ae762805]::mir::syntax::Place, core[2d48004a85dc5565]::option::Option<()>)> as alloc[73ea3e3568c2066d]::vec::spec_from_iter::SpecFromIter<(rustc_middle[8ab10741ae762805]::mir::syntax::Place, core[2d48004a85dc5565]::option::Option<()>), core[2d48004a85dc5565]::iter::adapters::map::Map<core[2d48004a85dc5565]::iter::adapters::enumerate::Enumerate<core[2d48004a85dc5565]::slice::iter::Iter<rustc_middle[8ab10741ae762805]::ty::FieldDef>>, <rustc_mir_dataflow[509d19dec06e5cb0]::elaborate_drops::DropCtxt<rustc_mir_transform[2a96cee0d5989ce9]::shim::DropShimElaborator>>::move_paths_for_fields::{closure#0}>>>::from_iter
#0 92.27   26:     0xffff83790cdc - <rustc_mir_dataflow[509d19dec06e5cb0]::elaborate_drops::DropCtxt<rustc_mir_transform[2a96cee0d5989ce9]::shim::DropShimElaborator>>::open_drop_for_adt
#0 92.27   27:     0xffff83790648 - <rustc_mir_dataflow[509d19dec06e5cb0]::elaborate_drops::DropCtxt<rustc_mir_transform[2a96cee0d5989ce9]::shim::DropShimElaborator>>::elaborate_drop
#0 92.27   28:     0xffff838d8028 - rustc_mir_transform[2a96cee0d5989ce9]::shim::make_shim
#0 92.27   29:     0xffff843fc124 - <std[ee9b954e96d984cc]::thread::local::LocalKey<core[2d48004a85dc5565]::cell::Cell<*const ()>>>::with::<rustc_middle[8ab10741ae762805]::ty::context::tls::enter_context<rustc_query_system[d43ab53be31e41e1]::query::plumbing::execute_job_non_incr<rustc_query_impl[d86a9383aa5ae983]::queries::mir_shims, rustc_query_impl[d86a9383aa5ae983]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[8ab10741ae762805]::query::erase::Erased<[u8; 8usize]>>::{closure#0}, rustc_middle[8ab10741ae762805]::query::erase::Erased<[u8; 8usize]>>
#0 92.27   30:     0xffff8467a4cc - rustc_query_system[d43ab53be31e41e1]::query::plumbing::try_execute_query::<rustc_query_impl[d86a9383aa5ae983]::queries::mir_shims, rustc_query_impl[d86a9383aa5ae983]::plumbing::QueryCtxt>
#0 92.27   31:     0xffff84511e78 - <rustc_query_impl[d86a9383aa5ae983]::Queries as rustc_middle[8ab10741ae762805]::ty::query::QueryEngine>::mir_shims
#0 92.27   32:     0xffff852b8e24 - <rustc_middle[8ab10741ae762805]::ty::context::TyCtxt>::instance_mir
#0 92.27   33:     0xffff838986ec - <rustc_mir_transform[2a96cee0d5989ce9]::inline::Inliner>::try_inlining
#0 92.27   34:     0xffff83897fc4 - <rustc_mir_transform[2a96cee0d5989ce9]::inline::Inliner>::process_blocks
#0 92.27   35:     0xffff838980dc - <rustc_mir_transform[2a96cee0d5989ce9]::inline::Inliner>::process_blocks
#0 92.27   36:     0xffff83897a88 - <rustc_mir_transform[2a96cee0d5989ce9]::inline::Inline as rustc_middle[8ab10741ae762805]::mir::MirPass>::run_pass
#0 92.27   37:     0xffff838d23a4 - rustc_mir_transform[2a96cee0d5989ce9]::pass_manager::run_passes_inner
#0 92.27   38:     0xffff83819ec4 - rustc_mir_transform[2a96cee0d5989ce9]::optimized_mir
#0 92.28   39:     0xffff84607c04 - rustc_query_system[d43ab53be31e41e1]::query::plumbing::try_execute_query::<rustc_query_impl[d86a9383aa5ae983]::queries::optimized_mir, rustc_query_impl[d86a9383aa5ae983]::plumbing::QueryCtxt>
#0 92.28   40:     0xffff84508368 - <rustc_query_impl[d86a9383aa5ae983]::Queries as rustc_middle[8ab10741ae762805]::ty::query::QueryEngine>::optimized_mir
#0 92.28   41:     0xffff84a03614 - <rustc_metadata[6fb9eab109fb1453]::rmeta::encoder::EncodeContext>::encode_crate_root
#0 92.28   42:     0xffff84a10ba4 - rustc_metadata[6fb9eab109fb1453]::rmeta::encoder::encode_metadata_impl
#0 92.28   43:     0xffff849b2480 - rustc_data_structures[3d18d37d82609441]::sync::join::<rustc_metadata[6fb9eab109fb1453]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[6fb9eab109fb1453]::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
#0 92.28   44:     0xffff84a103c4 - rustc_metadata[6fb9eab109fb1453]::rmeta::encoder::encode_metadata
#0 92.28   45:     0xffff8499a980 - rustc_metadata[6fb9eab109fb1453]::fs::encode_and_write_metadata
#0 92.28   46:     0xffff8078b2a0 - rustc_interface[7da19b7ad2a25e97]::passes::start_codegen
#0 92.28   47:     0xffff80776d34 - <rustc_middle[8ab10741ae762805]::ty::context::GlobalCtxt>::enter::<<rustc_interface[7da19b7ad2a25e97]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[2d48004a85dc5565]::result::Result<alloc[73ea3e3568c2066d]::boxed::Box<dyn core[2d48004a85dc5565]::any::Any>, rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>
#0 92.28   48:     0xffff8073fd58 - <rustc_interface[7da19b7ad2a25e97]::queries::Queries>::ongoing_codegen
#0 92.28   49:     0xffff8069b230 - <rustc_interface[7da19b7ad2a25e97]::interface::Compiler>::enter::<rustc_driver_impl[834bde73645836c3]::run_compiler::{closure#1}::{closure#2}, core[2d48004a85dc5565]::result::Result<core[2d48004a85dc5565]::option::Option<rustc_interface[7da19b7ad2a25e97]::queries::Linker>, rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>
#0 92.28   50:     0xffff806d10f0 - rustc_span[566bd16bcf1e2cd5]::set_source_map::<core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>, rustc_interface[7da19b7ad2a25e97]::interface::run_compiler<core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>, rustc_driver_impl[834bde73645836c3]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
#0 92.29   51:     0xffff806799bc - <scoped_tls[922f07b1016f6b55]::ScopedKey<rustc_span[566bd16bcf1e2cd5]::SessionGlobals>>::set::<rustc_interface[7da19b7ad2a25e97]::interface::run_compiler<core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>, rustc_driver_impl[834bde73645836c3]::run_compiler::{closure#1}>::{closure#0}, core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>
#0 92.29   52:     0xffff806d6464 - std[ee9b954e96d984cc]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7da19b7ad2a25e97]::util::run_in_thread_pool_with_globals<rustc_interface[7da19b7ad2a25e97]::interface::run_compiler<core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>, rustc_driver_impl[834bde73645836c3]::run_compiler::{closure#1}>::{closure#0}, core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>
#0 92.29   53:     0xffff806e3d1c - <<std[ee9b954e96d984cc]::thread::Builder>::spawn_unchecked_<rustc_interface[7da19b7ad2a25e97]::util::run_in_thread_pool_with_globals<rustc_interface[7da19b7ad2a25e97]::interface::run_compiler<core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>, rustc_driver_impl[834bde73645836c3]::run_compiler::{closure#1}>::{closure#0}, core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[2d48004a85dc5565]::result::Result<(), rustc_span[566bd16bcf1e2cd5]::ErrorGuaranteed>>::{closure#1} as core[2d48004a85dc5565]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
#0 92.29   54:     0xffff7f939620 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h82ef39943f2999bd
#0 92.29                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1962:9
#0 92.29   55:     0xffff7f939620 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hae7c2ed10f6de47e
#0 92.29                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/boxed.rs:1962:9
#0 92.29   56:     0xffff7f939620 - std::sys::unix::thread::Thread::new::thread_start::h5463bf79a61ca5d5
#0 92.29                                at /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/std/src/sys/unix/thread.rs:108:17
#0 92.29   57:     0xffff7f6b1648 - start_thread
#0 92.29   58:     0xffff7f7e5c1c - <unknown>
#0 92.29   59:                0x0 - <unknown>
#0 92.29
#0 92.29 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
#0 92.29
#0 92.29 note: rustc 1.71.0-nightly (39c6804b9 2023-04-19) running on aarch64-unknown-linux-gnu
#0 92.29
#0 92.29 note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no
#0 92.29
#0 92.29 note: some of the compiler flags provided by cargo are hidden
#0 92.29
#0 92.29 query stack during panic:
#0 92.29 #0 [mir_shims] generating MIR shim for `core::ptr::drop_in_place`
#0 92.29 #1 [optimized_mir] optimizing MIR for `vec::ops::<impl at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-0.18.5/src/vec/ops.rs:141:1: 141:33>::drop::{closure#0}`
#0 92.29 end of query stack
#0 92.34 error: could not compile `bitvec` (lib)
#0 92.34 warning: build failed, waiting for other jobs to finish.

@matthiaskrgr
Copy link
Member Author

@pbdeuchler this has probably different root causes as my and your query stack during panic: s are different.
What version of bitvec are you compiling?

@pbdeuchler
Copy link

A convenience crate was pulling it in, i've removed the code calling that crate so I can't be 100% sure but diffing from the latest commit (a couple days ago) it looks like:

-[[package]]
-name = "bitvec"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98fcd36dda4e17b7d7abc64cb549bf0201f4ab71e00700c798ca7e62ed3761fa"
-dependencies = [
- "funty",
- "radium",
- "wyz",
-]
-

Which is about 3 years old. It was compiling just fine on nightly the other week though.

@12101111
Copy link
Contributor

I submit the ICE from bitvec to another issue: #110682

@pbdeuchler
Copy link

I submit the ICE from bitvec to another issue: #110682

🫡

@matthiaskrgr
Copy link
Member Author

searched toolchains nightly-2023-01-12 through nightly-2023-04-28

Regression in nightly-2023-01-13
Regression in 2b8590e
#106309 cc @compiler-errors

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jul 14, 2023
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 15, 2024
@workingjubilee workingjubilee added the requires-incomplete-features This issue requires the use of incomplete features. label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features This issue requires the use of incomplete features. requires-nightly This issue requires a nightly compiler in some way. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants