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: value <= 0xFFFF_FF00 #109239

Closed
matthiaskrgr opened this issue Mar 16, 2023 · 4 comments · Fixed by #109240
Closed

ICE: value <= 0xFFFF_FF00 #109239

matthiaskrgr opened this issue Mar 16, 2023 · 4 comments · Fixed by #109240
Assignees
Labels
C-bug Category: This is a bug. F-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

#![allow(incomplete_features)]
#![feature(return_position_impl_trait_in_trait)]
#![crate_type ="lib"]

trait Trait {
    type Type;

    fn method(&self) -> impl Trait<Type = impl Trait<Type = impl Sized + '_> + '_>;
}

Meta

rustc --version --verbose:

rustc 1.70.0-nightly (ab654863c 2023-03-15)
binary: rustc
commit-hash: ab654863c3d50482f260cf862647f1fe0ff5e010
commit-date: 2023-03-15
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7

Error output

<output>
Backtrace

thread 'rustc' panicked at 'assertion failed: value <= 0xFFFF_FF00', /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/compiler/rustc_type_ir/src/lib.rs:279:1
stack backtrace:
   0:     0x7f5c5eec750a - std::backtrace_rs::backtrace::libunwind::trace::hca5b94e57c77ccf5
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f5c5eec750a - std::backtrace_rs::backtrace::trace_unsynchronized::h5b5fce74d82f8778
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f5c5eec750a - std::sys_common::backtrace::_print_fmt::ha47e7aaa1d2225ec
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f5c5eec750a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1aaba92be89501b
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f5c5ef2ab3e - core::fmt::write::h750a8e721825859f
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f5c5eeba375 - std::io::Write::write_fmt::hbf6015e32697f7ba
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/io/mod.rs:1684:15
   6:     0x7f5c5eec72d5 - std::sys_common::backtrace::_print::h301c6b6cac7c0a3a
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f5c5eec72d5 - std::sys_common::backtrace::print::h7f921f37b0542aab
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f5c5eeca04f - std::panicking::default_hook::{{closure}}::ha1e8e5c596b5be71
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:271:22
   9:     0x7f5c5eec9d8b - std::panicking::default_hook::hb0497d64ba7aeb9b
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:290:9
  10:     0x7f5c5dc65475 - rustc_driver_impl[190cb2184ae08abb]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f5c5eeca88d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5fe0c368b54c8ed7
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:2002:9
  12:     0x7f5c5eeca88d - std::panicking::rust_panic_with_hook::hde905c542c1ea61a
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:696:13
  13:     0x7f5c5eeca5c2 - std::panicking::begin_panic_handler::{{closure}}::hb8e5dc8ca1bc0593
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:581:13
  14:     0x7f5c5eec7976 - std::sys_common::backtrace::__rust_end_short_backtrace::h5b7e4b9492630e37
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7f5c5eeca312 - rust_begin_unwind
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:579:5
  16:     0x7f5c5ef26e93 - core::panicking::panic_fmt::hb9f9af2a2de3db20
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/core/src/panicking.rs:64:14
  17:     0x7f5c5ef26f2d - core::panicking::panic::h52f24dac4e3af747
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/core/src/panicking.rs:114:5
  18:     0x7f5c5ea4c020 - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_ty::{closure#0}
  19:     0x7f5c5ea5c342 - <rustc_middle[d8dcb3e1f9b6a1d3]::ty::subst::GenericArg as rustc_type_ir[1cfc6eb3c12c01ce]::fold::TypeFoldable<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::fold::RegionFolder>
  20:     0x7f5c5ea7d4bf - <&rustc_middle[d8dcb3e1f9b6a1d3]::ty::list::List<rustc_middle[d8dcb3e1f9b6a1d3]::ty::subst::GenericArg> as rustc_type_ir[1cfc6eb3c12c01ce]::fold::TypeFoldable<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::fold::RegionFolder>
  21:     0x7f5c5ea66d65 - <rustc_middle[d8dcb3e1f9b6a1d3]::ty::sty::AliasTy as rustc_type_ir[1cfc6eb3c12c01ce]::fold::TypeFoldable<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::fold::RegionFolder>
  22:     0x7f5c5ea4bb56 - <rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>::fold_regions::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::sty::AliasTy, <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_ty::{closure#0}>
  23:     0x7f5c5cc77cc8 - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_ty
  24:     0x7f5c5ea7857e - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_binder::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::PredicateKind>
  25:     0x7f5c5cc77e68 - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_ty
  26:     0x7f5c5ea7857e - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_binder::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::PredicateKind>
  27:     0x7f5c5cc77e68 - <rustc_ty_utils[3e59128907a02351]::ty::ImplTraitInTraitFinder as rustc_type_ir[1cfc6eb3c12c01ce]::visit::TypeVisitor<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::TyCtxt>>::visit_ty
  28:     0x7f5c5cde1b78 - rustc_ty_utils[3e59128907a02351]::ty::param_env
  29:     0x7f5c5cddf29f - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::param_env, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  30:     0x7f5c5c47b7f1 - rustc_hir_analysis[60e36e2803dc18bc]::check::wfcheck::check_associated_item
  31:     0x7f5c5c476ed9 - rustc_hir_analysis[60e36e2803dc18bc]::check::wfcheck::check_well_formed
  32:     0x7f5c5c0fe2bd - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::check_well_formed, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  33:     0x7f5c5c0fdc5e - <rustc_query_impl[9c3c364151da071f]::Queries as rustc_middle[d8dcb3e1f9b6a1d3]::ty::query::QueryEngine>::check_well_formed
  34:     0x7f5c5cf72238 - rustc_data_structures[d80b863c6c14e96e]::sync::par_for_each_in::<&[rustc_hir[4f3ccf67fd44b448]::hir::TraitItemId], <rustc_middle[d8dcb3e1f9b6a1d3]::hir::ModuleItems>::par_trait_items<rustc_hir_analysis[60e36e2803dc18bc]::check::wfcheck::check_mod_type_wf::{closure#2}>::{closure#0}>
  35:     0x7f5c5cf7213c - rustc_hir_analysis[60e36e2803dc18bc]::check::wfcheck::check_mod_type_wf
  36:     0x7f5c5d293b0e - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::check_mod_type_wf, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  37:     0x7f5c5d293693 - <rustc_query_impl[9c3c364151da071f]::Queries as rustc_middle[d8dcb3e1f9b6a1d3]::ty::query::QueryEngine>::check_mod_type_wf
  38:     0x7f5c5be71de8 - rustc_data_structures[d80b863c6c14e96e]::sync::par_for_each_in::<&[rustc_hir[4f3ccf67fd44b448]::hir_id::OwnerId], <rustc_middle[d8dcb3e1f9b6a1d3]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[60e36e2803dc18bc]::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  39:     0x7f5c5be71c70 - <rustc_session[de52af1e8e7b6fd9]::session::Session>::track_errors::<rustc_hir_analysis[60e36e2803dc18bc]::check_crate::{closure#5}, ()>
  40:     0x7f5c5be6e660 - rustc_hir_analysis[60e36e2803dc18bc]::check_crate
  41:     0x7f5c5be65d25 - rustc_interface[c60781b202b529bb]::passes::analysis
  42:     0x7f5c5d473b9c - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::analysis, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  43:     0x7f5c5d473890 - <rustc_query_impl[9c3c364151da071f]::Queries as rustc_middle[d8dcb3e1f9b6a1d3]::ty::query::QueryEngine>::analysis
  44:     0x7f5c5d29d899 - <rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  45:     0x7f5c5ce29dc8 - rustc_span[e39f9d1da20fb520]::with_source_map::<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  46:     0x7f5c5ce218e0 - <scoped_tls[3baa4ec3dd04ff72]::ScopedKey<rustc_span[e39f9d1da20fb520]::SessionGlobals>>::set::<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  47:     0x7f5c5ce20fc2 - std[75e4c6f671155ce4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c60781b202b529bb]::util::run_in_thread_pool_with_globals<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  48:     0x7f5c5ce20d6a - <<std[75e4c6f671155ce4]::thread::Builder>::spawn_unchecked_<rustc_interface[c60781b202b529bb]::util::run_in_thread_pool_with_globals<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#1} as core[86d79cd3dd753e85]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f5c5eed4783 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3341c80cf784afb0
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9
  50:     0x7f5c5eed4783 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a4397435c8c4587
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9
  51:     0x7f5c5eed4783 - std::sys::unix::thread::Thread::new::thread_start::h4d87276efd9893f6
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys/unix/thread.rs:108:17
  52:     0x7f5c5a862bb5 - <unknown>
  53:     0x7f5c5a8e4d90 - <unknown>
  54:                0x0 - <unknown>

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: rustc 1.70.0-nightly (ab654863c 2023-03-15) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [param_env] computing normalized predicates of `Trait::method`
#1 [check_well_formed] checking that `Trait::method` is well-formed
#2 [check_mod_type_wf] checking that types are well-formed in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack

@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. F-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]` labels Mar 16, 2023
@compiler-errors compiler-errors self-assigned this Mar 16, 2023
@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Mar 16, 2023

probably #108203

Regression in rust-lang-ci@bdb8f15

searched nightlies: from nightly-2023-02-15 to nightly-2023-03-16
regressed nightly: nightly-2023-02-20
searched commit range: 4507fda...7aa413d
regressed commit: dc89a80

bisected with cargo-bisect-rustc v0.6.5

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --test-dir=/home/matthias/vcs/github/rust_bisect/foo

@compiler-errors
Copy link
Member

It's actually #108583

@compiler-errors
Copy link
Member

compiler-errors commented Mar 16, 2023

Or at least, the logic broke because of #108583, so the ICE message probably changed in that PR from some other message, to this one in the title.

@langston-barrett
Copy link

@rustbot label +S-bug-has-mcve

@rustbot rustbot added the S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue label Mar 16, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 21, 2023
… r=oli-obk

Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes rust-lang#109239
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2023
… r=oli-obk

Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes rust-lang#109239
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2023
… r=oli-obk

Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes rust-lang#109239
Noratrieb added a commit to Noratrieb/rust that referenced this issue Mar 21, 2023
… r=oli-obk

Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes rust-lang#109239
Noratrieb added a commit to Noratrieb/rust that referenced this issue Mar 21, 2023
… r=oli-obk

Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes rust-lang#109239
@bors bors closed this as completed in 66ba60a Mar 21, 2023
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 21, 2023
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-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
5 participants