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: Unknown layout #48010

Closed
panicbit opened this issue Feb 5, 2018 · 1 comment · Fixed by #65395
Closed

ICE: Unknown layout #48010

panicbit opened this issue Feb 5, 2018 · 1 comment · Fixed by #65395
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@panicbit
Copy link
Contributor

panicbit commented Feb 5, 2018

Affected Rust versions:
rustc 1.23.0 (766bd11 2018-01-01)
rustc 1.25.0-nightly (3d292b7 2018-02-03)

Minimal example.
(Doesn't seem to trigger on the playground for some reason.)
Doesn't trigger when being compiled as binary crate.
Playground version.

error: internal compiler error: librustc_trans/context.rs:471: failed to get layout for `&Path<Foo>`: the type `<Foo as Bar>::Slice` has an unknown layout

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:535:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:380
   3: std::panicking::default_hook
             at libstd/panicking.rs:396
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:576
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::bug
   7: <std::thread::local::LocalKey<T>>::with
   8: rustc::ty::context::tls::with_opt
   9: rustc::session::opt_span_bug_fmt
  10: rustc::session::bug_fmt
  11: <&'a rustc_trans::context::CodegenCx<'a, 'tcx> as rustc::ty::layout::LayoutOf<&'tcx rustc::ty::TyS<'tcx>>>::layout_of
  12: rustc_trans::abi::FnType::unadjusted::{{closure}}
  13: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  14: rustc_trans::abi::FnType::unadjusted
  15: rustc_trans::declare::declare_fn
  16: rustc_trans::trans_item::predefine_fn
  17: rustc_trans::trans_item::MonoItemExt::predefine
  18: rustc_trans::base::compile_codegen_unit
  19: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::compute_result
  20: rustc::dep_graph::graph::DepGraph::with_task_impl
  21: rustc_errors::Handler::track_diagnostics
  22: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  23: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::force
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::try_get
  25: rustc::ty::maps::TyCtxtAt::compile_codegen_unit
  26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::compile_codegen_unit
  27: rustc_trans::base::trans_crate
  28: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  29: rustc::util::common::time
  30: rustc_driver::driver::phase_4_translate_to_llvm
  31: rustc_driver::driver::compile_input::{{closure}}
  32: <std::thread::local::LocalKey<T>>::with
  33: <std::thread::local::LocalKey<T>>::with
  34: rustc::ty::context::TyCtxt::create_and_enter
  35: rustc_driver::driver::compile_input
  36: rustc_driver::run_compiler
@TimNN TimNN added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Feb 6, 2018
@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 13, 2019
@JohnTitor
Copy link
Member

I cannot see the ICE on the latest nightly, beta, and stable. marked as E-needstest

Centril added a commit to Centril/rust that referenced this issue Oct 14, 2019
Add some tests for fixed ICEs

Fixes rust-lang#44153 (from 1.23.0)
Fixes rust-lang#47486 (from 1.36.0)
Fixes rust-lang#48010 (from 1.38.0)
Fixes rust-lang#48027 (from nightly)
Fixes rust-lang#48638 (from nightly)
@bors bors closed this as completed in a73e073 Oct 14, 2019
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-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants