Skip to content

ICE: could not fully normalize #73249

New issue

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

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

Already on GitHub? # to your account

Closed
Mark-Simulacrum opened this issue Jun 11, 2020 · 6 comments · Fixed by #73257
Closed

ICE: could not fully normalize #73249

Mark-Simulacrum opened this issue Jun 11, 2020 · 6 comments · Fixed by #73257
Assignees
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Mark-Simulacrum
Copy link
Member

ICE in packed-simd on rustc-perf, caused by ec42485. I suspect #72897 but am not sure. cc @lcnr

Would be good to minimize so we can add a test case.


    Checking packed_simd v0.3.0 (/tmp/.tmpmCakLH)
error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:37: could not fully normalize `<A as sealed::SimdArray>::Tuple`

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:907:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.46.0-nightly (ec42485ee 2020-06-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib

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

error: aborting due to previous error

error: could not compile `packed_simd`.

To learn more, run the command again with --verbose.
@Mark-Simulacrum Mark-Simulacrum 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. labels Jun 11, 2020
@lcnr lcnr added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jun 11, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jun 11, 2020
@lcnr
Copy link
Contributor

lcnr commented Jun 11, 2020

Could also be caused by #73206, will try to reproduce this locally.

@Mark-Simulacrum
Copy link
Member Author

Did you mean to point at some specific part of that rollup? It's almost certainly caused by the rollup (or a not-yet-benchmarked commit I guess).

@lcnr
Copy link
Contributor

lcnr commented Jun 11, 2020

I meant #72890 😅

@lcnr
Copy link
Contributor

lcnr commented Jun 11, 2020

This seems to be caused by #72890, cc @davidtwco

Backtrace:

error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:37: could not fully normalize `<A as sealed::SimdArray>::Tuple`

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:907:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.heygears.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.heygears.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::bug
  14: rustc_errors::Handler::bug
  15: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc_middle::ty::context::tls::with_opt::{{closure}}
  17: rustc_middle::ty::context::tls::with_opt
  18: rustc_middle::util::bug::opt_span_bug_fmt
  19: rustc_middle::util::bug::bug_fmt
  20: rustc_middle::ty::context::GlobalCtxt::enter_local
  21: rustc_traits::normalize_erasing_regions::normalize_generic_arg_after_erasing_regions
  22: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::normalize_generic_arg_after_erasing_regions>::compute
  23: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  24: rustc_data_structures::stack::ensure_sufficient_stack
  25: rustc_query_system::query::plumbing::get_query_impl
  26: rustc_middle::ty::normalize_erasing_regions::<impl rustc_middle::ty::context::TyCtxt>::normalize_erasing_regions
  27: rustc_middle::ty::AdtDef::transparent_newtype_field
  28: rustc_lint::types::ImproperCTypesVisitor::check_type_for_ffi
  29: rustc_lint::types::ImproperCTypesVisitor::check_type_for_ffi_and_report_errors
  30: <rustc_lint::types::ImproperCTypes as rustc_lint::passes::LateLintPass>::check_foreign_item
  31: rustc_hir::intravisit::walk_item
  32: rustc_hir::intravisit::Visitor::visit_nested_item
  33: rustc_hir::intravisit::walk_mod
  34: rustc_lint::late::late_lint_mod
  35: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::lint_mod>::compute
  36: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  37: rustc_data_structures::stack::ensure_sufficient_stack
  38: rustc_query_system::query::plumbing::get_query_impl
  39: rustc_query_system::query::plumbing::ensure_query_impl
  40: rustc_session::utils::<impl rustc_session::session::Session>::time
  41: std::panicking::try
  42: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  43: rustc_session::utils::<impl rustc_session::session::Session>::time
  44: rustc_interface::passes::analysis
  45: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  46: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  47: rustc_query_system::query::plumbing::get_query_impl
  48: rustc_middle::ty::context::tls::enter_global
  49: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  50: rustc_span::with_source_map
  51: rustc_interface::interface::run_compiler_in_existing_thread_pool
  52: scoped_tls::ScopedKey<T>::set

@davidtwco davidtwco self-assigned this Jun 11, 2020
@lcnr
Copy link
Contributor

lcnr commented Jun 11, 2020

Minimal repro:

pub trait Foo {
    type Assoc;
}

impl Foo for () {
    type Assoc = u32;
}

extern "C" {
    pub fn lint_me(x: Bar<()>);
}

#[repr(transparent)]
pub struct Bar<T: Foo> {
    value: <T as Foo>::Assoc,
}

@lcnr lcnr added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 12, 2020
@lcnr
Copy link
Contributor

lcnr commented Jun 12, 2020

Assigning P-critical as discussed as part of the Prioritization Working Group process and removing I-prioritize.

alecmocatta added a commit to alecmocatta/streaming_algorithms that referenced this issue Jun 17, 2020
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jun 17, 2020
alecmocatta added a commit to constellation-rs/amadeus that referenced this issue Jun 17, 2020
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 19, 2020
…es-projection, r=lcnr,varkor

ty: projections in `transparent_newtype_field`

Fixes rust-lang#73249.

This PR modifies `transparent_newtype_field` so that it handles
projections with generic parameters, where `normalize_erasing_regions`
would ICE.
@bors bors closed this as completed in 2d8bd9b Jun 19, 2020
alecmocatta added a commit to constellation-rs/amadeus that referenced this issue Aug 1, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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