Closed
Description
I encountered an ICE today. Below you find the backtrace of running cargo test
. I ran cargo clean
afterwards and the ICE vanished, so it seams to be connected to incremental compilation.
thread 'rustc' panicked at 'index out of bounds: the len is 7 but the index is 7', /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libcore/slice/mod.rs:2695:10
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 src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
3: std::panicking::default_hook
at src/libstd/panicking.rs:211
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:478
6: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:381
7: rust_begin_unwind
at src/libstd/panicking.rs:308
8: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
9: core::panicking::panic_bounds_check
at src/libcore/panicking.rs:61
10: <rustc::ty::query::on_disk_cache::CacheDecoder as serialize::serialize::SpecializedDecoder<syntax_pos::span_encoding::Span>>::specialized_decode
11: serialize::serialize::Decoder::read_struct
12: serialize::serialize::Decoder::read_seq
13: serialize::serialize::Decoder::read_struct
14: serialize::serialize::Decoder::read_seq
15: <rustc::mir::Mir as serialize::serialize::Decodable>::decode::{{closure}}
16: rustc::ty::query::on_disk_cache::OnDiskCache::try_load_query_result
17: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
18: rustc_mir::monomorphize::collector::collect_items_rec
19: rustc_mir::monomorphize::collector::collect_items_rec
20: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}
21: rustc::util::common::time
22: rustc_mir::monomorphize::collector::collect_crate_mono_items
23: rustc::util::common::time
24: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
25: rustc::ty::query::__query_compute::collect_and_partition_mono_items
26: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_and_partition_mono_items>::compute
27: rustc::dep_graph::graph::DepGraph::with_task_impl
28: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
29: rustc_codegen_ssa::base::codegen_crate
30: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
31: rustc::util::common::time
32: rustc_interface::passes::start_codegen
33: rustc::ty::context::tls::enter_global
34: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
35: rustc_interface::passes::create_global_ctxt::{{closure}}
36: rustc_interface::passes::BoxedGlobalCtxt::enter
37: rustc_interface::queries::Query<T>::compute
38: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen
39: rustc_interface::interface::run_compiler_in_existing_thread_pool
40: std::thread::local::LocalKey<T>::with
41: scoped_tls::ScopedKey<T>::set
42: syntax::with_globals
query stack during panic:
#0 [optimized_mir] processing `metadata::tests::sample_metadata_can_be_deserialized::{{closure}}#0`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.36.0 (a53f9df32 2019-07-03) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental
note: some of the compiler flags provided by cargo are hidden
If required I can attach the full project including the build directories, as I zipped it after the ICE.
Metadata
Metadata
Assignees
Labels
Area: Incremental compilationCategory: This is a bug.Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.