Skip to content

rust 1.25.0 internal compiler error #49482

Closed
@glebpom

Description

@glebpom

I upgrade the rust to 1.25 and compilation starts failing. I use linux musl target

I tried this code:

cargo check

I expected to see this happen: Compile successful as it is on 1.24.1

Instead, this happened:

thread 'rustc' panicked at 'index out of bounds: the len is 10 but the index is 14', /checkout/src/liballoc/vec.rs:1551:10
stack backtrace:
   0:     0x7f56bab27653 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h09c1ee131a74b1c4
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f56bab1e884 - std::sys_common::backtrace::_print::h47a337b62b6d5e9e
                               at libstd/sys_common/backtrace.rs:71
   2:     0x7f56bab2425d - std::panicking::default_hook::{{closure}}::h945a649c9017832e
                               at libstd/sys_common/backtrace.rs:59
                               at libstd/panicking.rs:380
   3:     0x7f56bab23f62 - std::panicking::default_hook::hcc534c2d30fbcda3
                               at libstd/panicking.rs:396
   4:     0x7f56bab246d0 - std::panicking::rust_panic_with_hook::h09a7a3a353dc2f38
                               at libstd/panicking.rs:576
   5:     0x7f56bab2458e - std::panicking::begin_panic::h8327f16bde15df70
                               at libstd/panicking.rs:537
   6:     0x7f56bab24489 - std::panicking::begin_panic_fmt::h42ff1d37404632d6
                               at libstd/panicking.rs:521
   7:     0x7f56bab24412 - rust_begin_unwind
                               at libstd/panicking.rs:497
   8:     0x7f56bab89500 - core::panicking::panic_fmt::h0bd854df201d1baf
                               at libcore/panicking.rs:71
   9:     0x7f56bab894a3 - core::panicking::panic_bounds_check::hd6045bfa984e7c3a
                               at libcore/panicking.rs:58
  10:     0x7f56b925ba45 - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::def_path_hash::h826933ce08b32d99
  11:     0x7f56b79805d0 - rustc::ich::impls_hir::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'tcx>> for rustc::hir::def::Def>::hash_stable::hf18db27c0bf2284c
  12:     0x7f56b756deff - <alloc::rc::Rc<T> as rustc_data_structures::stable_hasher::HashStable<CTX>>::hash_stable::h7d0de56d862538b8
  13:     0x7f56b7715fb1 - rustc::dep_graph::graph::DepGraph::with_task_impl::h517d29720454a423
  14:     0x7f56b7abf129 - rustc::ty::maps::<impl rustc::ty::maps::queries::item_children<'tcx>>::force::hd20bb9cbc884e6d8
  15:     0x7f56b7ac0143 - rustc::ty::maps::<impl rustc::ty::maps::queries::item_children<'tcx>>::try_get::hf4e22a81effd736f
  16:     0x7f56b7b11768 - rustc::ty::maps::TyCtxtAt::item_children::h9386cf746ec5c43c
  17:     0x7f56b7b0b330 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::item_children::hf0d1971743307e6d
  18:     0x7f56b918670e - core::ops::function::FnOnce::call_once::h5a4e2f4153e6fba6
  19:     0x7f56b770dc6c - rustc::dep_graph::graph::DepGraph::with_task_impl::h14e25071ee066288
  20:     0x7f56b7acd3bf - rustc::ty::maps::<impl rustc::ty::maps::queries::visible_parent_map<'tcx>>::force::hb839833d3c5d7633
  21:     0x7f56b7ace2f2 - rustc::ty::maps::<impl rustc::ty::maps::queries::visible_parent_map<'tcx>>::try_get::ha9a171e4eb5e2d5d
  22:     0x7f56b7b11d23 - rustc::ty::maps::TyCtxtAt::visible_parent_map::h77ebeb3a7f95d0a8
  23:     0x7f56b78ed5c8 - rustc::ty::item_path::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::push_item_path::ha09bb66a825a8af7
  24:     0x7f56b7963fb8 - rustc::util::ppaux::PrintContext::parameterized::{{closure}}::hba0f46ea6367e8cb
  25:     0x7f56b796319b - rustc::util::ppaux::PrintContext::parameterized::h0f583b0cfc39718b
  26:     0x7f56b7b3322c - <rustc::ty::sty::TraitRef<'tcx> as rustc::util::ppaux::Print>::print::h9fe64e9b1af00640
  27:     0x7f56b7b2f8d9 - <rustc::ty::sty::Binder<rustc::ty::sty::TraitRef<'tcx>> as rustc::util::ppaux::Print>::print::{{closure}}::hddf59dc3872d497c
  28:     0x7f56b7b2fac0 - rustc::util::ppaux::<impl core::fmt::Display for rustc::ty::sty::Binder<rustc::ty::sty::TraitRef<'tcx>>>::fmt::h5ae269f0b57c949e
  29:     0x7f56bab8e168 - core::fmt::write::h0e7cde1cd35d743d
                               at libcore/fmt/mod.rs:1084
                               at libcore/fmt/mod.rs:1031
  30:     0x7f56b9759ee6 - <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::instantiate_poly_trait_ref_inner::h3802d23851915cce
  31:     0x7f56b9803c81 - rustc_typeck::collect::compute_bounds::h1a5f44b659ada4d3
  32:     0x7f56b9802779 - rustc_typeck::collect::predicates_of::h12d9cb028a537ec9
  33:     0x7f56b79c567b - rustc::ty::maps::<impl rustc::ty::maps::queries::predicates_of<'tcx>>::compute_result::hee350f5813ba0a49
  34:     0x7f56b772c8a9 - rustc::dep_graph::graph::DepGraph::with_task_impl::ha95e97b935a69343
  35:     0x7f56b79c59e4 - rustc::ty::maps::<impl rustc::ty::maps::queries::predicates_of<'tcx>>::force::hb241b30e3664ec3a
  36:     0x7f56b79c6b2b - rustc::ty::maps::<impl rustc::ty::maps::queries::predicates_of<'tcx>>::try_get::h9c9040b1ff7ce84e
  37:     0x7f56b7b0bb8c - rustc::ty::maps::TyCtxtAt::predicates_of::he131f9d01f8ea2f0
  38:     0x7f56b7b09da8 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::predicates_of::h290fb438058cab73
  39:     0x7f56b97fb46e - <rustc_typeck::collect::CollectItemTypesVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_impl_item::h27b1f3b1f4b33af0
  40:     0x7f56b98109e8 - rustc_typeck::check_crate::{{closure}}::{{closure}}::haf4766a57872612a
  41:     0x7f56b980e3cf - rustc_typeck::check_crate::h1f60189439234404
  42:     0x7f56bae62939 - rustc::ty::context::TyCtxt::create_and_enter::h452ea4e7454fa0d8
  43:     0x7f56baed086b - rustc_driver::driver::compile_input::h9f2059b513d7f2fa
  44:     0x7f56baeed92a - rustc_driver::run_compiler::h59e7c73de384eca5
  45:     0x7f56bae197aa - std::sys_common::backtrace::__rust_begin_short_backtrace::h0da0c13475152a36
  46:     0x7f56bab3d32e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  47:     0x7f56bae52946 - <F as alloc::boxed::FnBox<A>>::call_box::h2973aa97647f5468
  48:     0x7f56bab3458b - std::sys::unix::thread::Thread::new::thread_start::h711c51a13a158afa
                               at /checkout/src/liballoc/boxed.rs:798
                               at libstd/sys_common/thread.rs:24
                               at libstd/sys/unix/thread.rs:90
  49:     0x7f56b5a1d7fb - start_thread
  50:     0x7f56ba7ecb5e - clone
  51:                0x0 - <unknown>

error: internal compiler error: unexpected panic

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

Meta

rustc --version --verbose:

rustc 1.25.0 (84203cac6 2018-03-25)
binary: rustc
commit-hash: 84203cac67e65ca8640b8392348411098c856985
commit-date: 2018-03-25
host: x86_64-unknown-linux-gnu
release: 1.25.0
LLVM version: 6.0

Backtrace:

Metadata

Metadata

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions