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 involving type inference during check_transmute #104609

Closed
jruderman opened this issue Nov 19, 2022 · 3 comments · Fixed by #104657
Closed

ICE involving type inference during check_transmute #104609

jruderman opened this issue Nov 19, 2022 · 3 comments · Fixed by #104657
Assignees
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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.

Comments

@jruderman
Copy link
Contributor

jruderman commented Nov 19, 2022

Found with a modified fuzz-rustc

Code

fn foo() {
    oops;
}

unsafe fn bar() {
    std::mem::transmute::<_, *mut _>(1_u8);
}

fn main() {}

ICE (nightly)

thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 1', /cargo/registry/src/github.com-1ecc6299db9ec823/ena-0.14.0/src/snapshot_vec.rs:199:10
Backtrace
stack backtrace:
   0:     0x7f4b8f17c680 - std::backtrace_rs::backtrace::libunwind::trace::h883fd4f06d218f51
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4b8f17c680 - std::backtrace_rs::backtrace::trace_unsynchronized::h360e691b6ffad077
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4b8f17c680 - std::sys_common::backtrace::_print_fmt::ha1c779fad25181af
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4b8f17c680 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2e9f7b10fee83896
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4b8f1deaae - core::fmt::write::h11cb677d8e31009e
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f4b8f16ca05 - std::io::Write::write_fmt::h7caf3bcc9b98ddd9
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/io/mod.rs:1682:15
   6:     0x7f4b8f17c445 - std::sys_common::backtrace::_print::h12f07ee7fcfa0859
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f4b8f17c445 - std::sys_common::backtrace::print::h2b4d3c0f5aec5af4
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f4b8f17f14f - std::panicking::default_hook::{{closure}}::h1a322f0a2f0b22e8
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/panicking.rs:267:22
   9:     0x7f4b8f17ee8a - std::panicking::default_hook::he416aa9279d946a5
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/panicking.rs:286:9
  10:     0x7f4b8f17f95c - std::panicking::rust_panic_with_hook::hd7bed3f5cabcbca4
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/panicking.rs:688:13
  11:     0x7f4b8f17f6f7 - std::panicking::begin_panic_handler::{{closure}}::hb655088b25021774
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/panicking.rs:579:13
  12:     0x7f4b8f17cb2c - std::sys_common::backtrace::__rust_end_short_backtrace::h63aadde97bff9df8
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x7f4b8f17f412 - rust_begin_unwind
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/panicking.rs:575:5
  14:     0x7f4b8f1db483 - core::panicking::panic_fmt::h8c423b58a616c0fb
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/core/src/panicking.rs:65:14
  15:     0x7f4b8f1db652 - core::panicking::panic_bounds_check::h279a0a53083fb5a3
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/core/src/panicking.rs:150:5
  16:     0x7f4b903cc985 - <rustc_infer[2a31fe5b802fb9ca]::infer::canonical::canonicalizer::Canonicalizer as rustc_middle[a517d4798108a427]::ty::fold::TypeFolder>::fold_ty
  17:     0x7f4b90a7a74a - <rustc_infer[2a31fe5b802fb9ca]::infer::canonical::canonicalizer::Canonicalizer as rustc_middle[a517d4798108a427]::ty::fold::FallibleTypeFolder>::try_fold_predicate
  18:     0x7f4b90c79d0d - <rustc_infer[2a31fe5b802fb9ca]::infer::InferCtxt as rustc_trait_selection[b5c769cc9dfe78e8]::traits::query::evaluate_obligation::InferCtxtExt>::predicate_must_hold_modulo_regions
  19:     0x7f4b90c795a8 - rustc_trait_selection[b5c769cc9dfe78e8]::traits::type_known_to_meet_bound_modulo_regions
  20:     0x7f4b90c792dd - rustc_ty_utils[6268eb371cbf5bb1]::common_traits::is_sized_raw
  21:     0x7f4b90b48d0d - rustc_query_system[6f5b46e8647c6066]::query::plumbing::try_execute_query::<rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt, rustc_query_system[6f5b46e8647c6066]::query::caches::DefaultCache<rustc_middle[a517d4798108a427]::ty::ParamEnvAnd<rustc_middle[a517d4798108a427]::ty::Ty>, bool>>
  22:     0x7f4b90b45212 - <rustc_middle[a517d4798108a427]::ty::Ty>::is_sized
  23:     0x7f4b90b39435 - rustc_ty_utils[6268eb371cbf5bb1]::layout::layout_of_uncached
  24:     0x7f4b90d86bd6 - rustc_query_system[6f5b46e8647c6066]::query::plumbing::get_query::<rustc_query_impl[ccdef58dc88cdef9]::queries::layout_of, rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt>
  25:     0x7f4b90d86673 - <rustc_query_impl[ccdef58dc88cdef9]::Queries as rustc_middle[a517d4798108a427]::ty::query::QueryEngine>::layout_of
  26:     0x7f4b9124e8c1 - <rustc_middle[a517d4798108a427]::ty::layout::SizeSkeleton>::compute
  27:     0x7f4b918568e7 - <rustc_hir_typeck[55138d0d07b4d7c3]::fn_ctxt::FnCtxt>::check_transmute
  28:     0x7f4b90830528 - <rustc_hir_typeck[55138d0d07b4d7c3]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[55138d0d07b4d7c3]::typeck_with_fallback<rustc_hir_typeck[55138d0d07b4d7c3]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[a517d4798108a427]::ty::context::TypeckResults>
  29:     0x7f4b9082029b - rustc_hir_typeck[55138d0d07b4d7c3]::typeck
  30:     0x7f4b9081e49f - rustc_query_system[6f5b46e8647c6066]::query::plumbing::try_execute_query::<rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt, rustc_query_system[6f5b46e8647c6066]::query::caches::DefaultCache<rustc_span[b28debf63ec6c805]::def_id::LocalDefId, &rustc_middle[a517d4798108a427]::ty::context::TypeckResults>>
  31:     0x7f4b91b348b8 - rustc_data_structures[f196f90cd7726d0a]::sync::par_for_each_in::<&[rustc_span[b28debf63ec6c805]::def_id::LocalDefId], <rustc_middle[a517d4798108a427]::hir::map::Map>::par_body_owners<rustc_hir_typeck[55138d0d07b4d7c3]::typeck_item_bodies::{closure#0}>::{closure#0}>
  32:     0x7f4b91b34593 - rustc_hir_typeck[55138d0d07b4d7c3]::typeck_item_bodies
  33:     0x7f4b91a22c0a - rustc_query_system[6f5b46e8647c6066]::query::plumbing::try_execute_query::<rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt, rustc_query_system[6f5b46e8647c6066]::query::caches::DefaultCache<(), ()>>
  34:     0x7f4b91a22907 - rustc_query_system[6f5b46e8647c6066]::query::plumbing::get_query::<rustc_query_impl[ccdef58dc88cdef9]::queries::typeck_item_bodies, rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt>
  35:     0x7f4b907f9d5a - <rustc_session[77197df47e8f2df1]::session::Session>::time::<(), rustc_hir_analysis[bbd754e88e2981a3]::check_crate::{closure#7}>
  36:     0x7f4b907f96b2 - rustc_hir_analysis[bbd754e88e2981a3]::check_crate
  37:     0x7f4b907f931b - rustc_interface[f4a938fe0ced1d5a]::passes::analysis
  38:     0x7f4b91b8f5d4 - rustc_query_system[6f5b46e8647c6066]::query::plumbing::try_execute_query::<rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt, rustc_query_system[6f5b46e8647c6066]::query::caches::DefaultCache<(), core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>>
  39:     0x7f4b91b8f2d7 - rustc_query_system[6f5b46e8647c6066]::query::plumbing::get_query::<rustc_query_impl[ccdef58dc88cdef9]::queries::analysis, rustc_query_impl[ccdef58dc88cdef9]::plumbing::QueryCtxt>
  40:     0x7f4b9166261d - <rustc_interface[f4a938fe0ced1d5a]::passes::QueryContext>::enter::<rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>
  41:     0x7f4b9165e85f - <rustc_interface[f4a938fe0ced1d5a]::interface::Compiler>::enter::<rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}::{closure#2}, core[918e54342397e48e]::result::Result<core[918e54342397e48e]::option::Option<rustc_interface[f4a938fe0ced1d5a]::queries::Linker>, rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>
  42:     0x7f4b916598b2 - rustc_span[b28debf63ec6c805]::with_source_map::<core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>, rustc_interface[f4a938fe0ced1d5a]::interface::run_compiler<core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>, rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  43:     0x7f4b916593a9 - <scoped_tls[554912419d9f879]::ScopedKey<rustc_span[b28debf63ec6c805]::SessionGlobals>>::set::<rustc_interface[f4a938fe0ced1d5a]::interface::run_compiler<core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>, rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}>::{closure#0}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>
  44:     0x7f4b916589b8 - std[a6ffccdfacbb7019]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f4a938fe0ced1d5a]::util::run_in_thread_pool_with_globals<rustc_interface[f4a938fe0ced1d5a]::interface::run_compiler<core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>, rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}>::{closure#0}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>
  45:     0x7f4b916586dc - <<std[a6ffccdfacbb7019]::thread::Builder>::spawn_unchecked_<rustc_interface[f4a938fe0ced1d5a]::util::run_in_thread_pool_with_globals<rustc_interface[f4a938fe0ced1d5a]::interface::run_compiler<core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>, rustc_driver[ce6bec53505e320e]::run_compiler::{closure#1}>::{closure#0}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[918e54342397e48e]::result::Result<(), rustc_errors[dbdd4d57c91bfd67]::ErrorGuaranteed>>::{closure#1} as core[918e54342397e48e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  46:     0x7f4b930f3593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1dfdd2e8f0e0d7b2
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/alloc/src/boxed.rs:2000:9
  47:     0x7f4b930f3593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h559bc1b5e8ebdb2b
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/alloc/src/boxed.rs:2000:9
  48:     0x7f4b930f3593 - std::sys::unix::thread::Thread::new::thread_start::haa4c5ad6f089895d
                               at /rustc/b833ad56f46a0bbe0e8729512812a161e7dae28a/library/std/src/sys/unix/thread.rs:108:17
  49:     0x7f4b8f051609 - start_thread
  50:     0x7f4b8ef74133 - clone
  51:                0x0 - <unknown>

ICE (with debug assertions enabled)

thread 'rustc' panicked at 'assertion failed: !ty.has_non_region_infer()', compiler/rustc_middle/src/ty/layout.rs:266:9
Backtrace
stack backtrace:
   0:        0x10122cce1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h712c1ccf00a2a2d4
   1:        0x10129ded8 - core::fmt::write::hed31846cddb4e13c
   2:        0x101206548 - std::io::Write::write_fmt::hadfb68a89fce2e45
   3:        0x10122cad2 - std::sys_common::backtrace::print::hf652614139f45056
   4:        0x1011e7e35 - std::panicking::default_hook::{{closure}}::h616f22d699edcfee
   5:        0x1011e7c17 - std::panicking::default_hook::hf8b8756c0884d0f7
   6:        0x10e9f6938 - rustc_driver[2cc99eb9ce8fd4d0]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1011e84f6 - std::panicking::rust_panic_with_hook::h8e3a6a45e28bbff2
   8:        0x1011ee592 - std::panicking::begin_panic_handler::{{closure}}::h12b431d0c75da6f0
   9:        0x1011ee508 - std::sys_common::backtrace::__rust_end_short_backtrace::h43ea97d1d7d57e1e
  10:        0x1011e7f08 - _rust_begin_unwind
  11:        0x1012c0ff3 - core::panicking::panic_fmt::h7ec57a9a63e6db71
  12:        0x1012c10c7 - core::panicking::panic::h604eaa4391462ac9
  13:        0x1136dedec - <rustc_middle[ec331f01cef738e8]::ty::layout::SizeSkeleton>::compute
  14:        0x1113a79b1 - <rustc_hir_typeck[a85544c5c906f0]::fn_ctxt::FnCtxt>::check_transmute
  15:        0x111395fab - <rustc_hir_typeck[a85544c5c906f0]::fn_ctxt::FnCtxt>::check_transmutes
  16:        0x11131a685 - <rustc_hir_typeck[a85544c5c906f0]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[a85544c5c906f0]::typeck_with_fallback<rustc_hir_typeck[a85544c5c906f0]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[ec331f01cef738e8]::ty::context::TypeckResults>
  17:        0x1113158c5 - rustc_hir_typeck[a85544c5c906f0]::typeck_with_fallback::<rustc_hir_typeck[a85544c5c906f0]::typeck::{closure#0}>
  18:        0x111435a99 - rustc_hir_typeck[a85544c5c906f0]::typeck
  19:        0x1125cb021 - rustc_query_system[7c3a95a11108687b]::query::plumbing::try_execute_query::<rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt, rustc_query_system[7c3a95a11108687b]::query::caches::DefaultCache<rustc_span[3eb4c8eecaecace3]::def_id::LocalDefId, &rustc_middle[ec331f01cef738e8]::ty::context::TypeckResults>>
  20:        0x1126f626a - rustc_query_system[7c3a95a11108687b]::query::plumbing::get_query::<rustc_query_impl[4d128e94c6002277]::queries::typeck, rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt>
  21:        0x11288ec9f - <rustc_query_impl[4d128e94c6002277]::Queries as rustc_middle[ec331f01cef738e8]::ty::query::QueryEngine>::typeck
  22:        0x1114112ff - <core[95bb6d661b676f4d]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[a4b7c63b65e5070b]::sync::par_for_each_in<&[rustc_span[3eb4c8eecaecace3]::def_id::LocalDefId], <rustc_middle[ec331f01cef738e8]::hir::map::Map>::par_body_owners<rustc_hir_typeck[a85544c5c906f0]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> as core[95bb6d661b676f4d]::ops::function::FnOnce<()>>::call_once
  23:        0x1112ab449 - std[a294a2425e1eb3e0]::panicking::try::<(), core[95bb6d661b676f4d]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[a4b7c63b65e5070b]::sync::par_for_each_in<&[rustc_span[3eb4c8eecaecace3]::def_id::LocalDefId], <rustc_middle[ec331f01cef738e8]::hir::map::Map>::par_body_owners<rustc_hir_typeck[a85544c5c906f0]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  24:        0x1112b70d3 - rustc_data_structures[a4b7c63b65e5070b]::sync::par_for_each_in::<&[rustc_span[3eb4c8eecaecace3]::def_id::LocalDefId], <rustc_middle[ec331f01cef738e8]::hir::map::Map>::par_body_owners<rustc_hir_typeck[a85544c5c906f0]::typeck_item_bodies::{closure#0}>::{closure#0}>
  25:        0x1114358cf - rustc_hir_typeck[a85544c5c906f0]::typeck_item_bodies
  26:        0x112621745 - rustc_query_system[7c3a95a11108687b]::query::plumbing::try_execute_query::<rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt, rustc_query_system[7c3a95a11108687b]::query::caches::DefaultCache<(), ()>>
  27:        0x1126baec9 - rustc_query_system[7c3a95a11108687b]::query::plumbing::get_query::<rustc_query_impl[4d128e94c6002277]::queries::typeck_item_bodies, rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt>
  28:        0x11288e637 - <rustc_query_impl[4d128e94c6002277]::Queries as rustc_middle[ec331f01cef738e8]::ty::query::QueryEngine>::typeck_item_bodies
  29:        0x11165af38 - <rustc_session[637851e6765f7d04]::session::Session>::time::<(), rustc_hir_analysis[80fe1653d3660e1e]::check_crate::{closure#7}>
  30:        0x1114f55ee - rustc_hir_analysis[80fe1653d3660e1e]::check_crate
  31:        0x10eaee09a - rustc_interface[a117036b955f68d8]::passes::analysis
  32:        0x112615960 - rustc_query_system[7c3a95a11108687b]::query::plumbing::try_execute_query::<rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt, rustc_query_system[7c3a95a11108687b]::query::caches::DefaultCache<(), core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>>
  33:        0x1126f6619 - rustc_query_system[7c3a95a11108687b]::query::plumbing::get_query::<rustc_query_impl[4d128e94c6002277]::queries::analysis, rustc_query_impl[4d128e94c6002277]::plumbing::QueryCtxt>
  34:        0x11286a637 - <rustc_query_impl[4d128e94c6002277]::Queries as rustc_middle[ec331f01cef738e8]::ty::query::QueryEngine>::analysis
  35:        0x10e9f7e08 - <rustc_interface[a117036b955f68d8]::passes::QueryContext>::enter::<rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>
  36:        0x10ea0be58 - <rustc_interface[a117036b955f68d8]::interface::Compiler>::enter::<rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}::{closure#2}, core[95bb6d661b676f4d]::result::Result<core[95bb6d661b676f4d]::option::Option<rustc_interface[a117036b955f68d8]::queries::Linker>, rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>
  37:        0x10e9c8acb - rustc_span[3eb4c8eecaecace3]::with_source_map::<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_interface[a117036b955f68d8]::interface::run_compiler<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  38:        0x10e9dfc4a - <scoped_tls[c451c38e2ed76225]::ScopedKey<rustc_span[3eb4c8eecaecace3]::SessionGlobals>>::set::<rustc_interface[a117036b955f68d8]::interface::run_compiler<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}>::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>
  39:        0x10ea61240 - std[a294a2425e1eb3e0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a117036b955f68d8]::util::run_in_thread_pool_with_globals<rustc_interface[a117036b955f68d8]::interface::run_compiler<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}>::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>
  40:        0x10e9d3c7d - std[a294a2425e1eb3e0]::panicking::try::<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, core[95bb6d661b676f4d]::panic::unwind_safe::AssertUnwindSafe<<std[a294a2425e1eb3e0]::thread::Builder>::spawn_unchecked_<rustc_interface[a117036b955f68d8]::util::run_in_thread_pool_with_globals<rustc_interface[a117036b955f68d8]::interface::run_compiler<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}>::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
  41:        0x10ea02390 - <<std[a294a2425e1eb3e0]::thread::Builder>::spawn_unchecked_<rustc_interface[a117036b955f68d8]::util::run_in_thread_pool_with_globals<rustc_interface[a117036b955f68d8]::interface::run_compiler<core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>, rustc_driver[2cc99eb9ce8fd4d0]::run_compiler::{closure#1}>::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[95bb6d661b676f4d]::result::Result<(), rustc_errors[6f8b657b3a4b06c4]::ErrorGuaranteed>>::{closure#1} as core[95bb6d661b676f4d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:        0x1011e696b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8334a1a13ff5c0ac
  43:        0x10124969f - std::sys::unix::thread::Thread::new::thread_start::hc5c4d36d8f981ddc
  44:     0x7ff80d84d4e1 - __pthread_start

error: internal compiler error: unexpected panic

note: 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.67.0-dev running on x86_64-apple-darwin

query stack during panic:
#0 [typeck] type-checking `bar`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack

Regression

Regression in nightly-2022-05-28, perhaps from 56fd680 (#96046)

Version

  • nightly: 2022-11-18 b833ad5 on playground
  • with debug assertions: slightly newer, built locally from 62c627c
@jruderman jruderman added C-bug Category: This is a bug. 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. labels Nov 19, 2022
@jruderman
Copy link
Contributor Author

Might be a duplicate of #104085

@compiler-errors
Copy link
Member

Should be an easy fix, just need to delay a bug if the transmute source/target has (non-region) infer vars and bail from the check_transmute fn.

@compiler-errors compiler-errors added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Nov 19, 2022
@Rustin170506
Copy link
Member

@rustbot claim

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. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants