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

bootstrap: index out of bounds: the len is 1 but the index is 1', src/librustc_metadata/rmeta/decoder.rs:341:61 #74379

Closed
matthiaskrgr opened this issue Jul 15, 2020 · 3 comments
Labels
A-incr-comp Area: Incremental compilation A-metadata Area: Crate metadata C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

This happened while bootstrapping std, rustc @ 7e11379

Error output

Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling std v0.0.0 (/home/matthias/vcs/github/rust/src/libstd)
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/librustc_metadata/rmeta/decoder.rs:341:61
Backtrace

Updating only changed submodules
Submodules updated in 0.03 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.19s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.17s
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling std v0.0.0 (/home/matthias/vcs/github/rust/src/libstd)
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/librustc_metadata/rmeta/decoder.rs:341:61
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: rustc_metadata::rmeta::decoder::__ty_decoder_impl::<impl rustc_serialize::serialize::SpecializedDecoder<rustc_span::def_id::CrateNum> for rustc_metadata::rmeta::decoder::DecodeContext>::specialized_decode
  11: <T as rustc_serialize::serialize::Decodable>::decode
  12: rustc_serialize::serialize::Decoder::read_option
  13: rustc_metadata::rmeta::decoder::__ty_decoder_impl::<impl rustc_serialize::serialize::SpecializedDecoder<&rustc_middle::ty::sty::Const> for rustc_metadata::rmeta::decoder::DecodeContext>::specialized_decode
  14: rustc_metadata::rmeta::decoder::__ty_decoder_impl::<impl rustc_serialize::serialize::SpecializedDecoder<&rustc_middle::ty::TyS> for rustc_metadata::rmeta::decoder::DecodeContext>::specialized_decode
  15: rustc_metadata::rmeta::decoder::<impl rustc_metadata::creader::CrateMetadataRef>::get_type
  16: rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::type_of
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  18: rustc_query_system::query::plumbing::get_query_impl
  19: rustc_middle::ty::trait_def::trait_impls_of_provider::{{closure}}
  20: rustc_middle::ty::trait_def::trait_impls_of_provider
  21: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::trait_impls_of>::compute
  22: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  23: rustc_query_system::query::plumbing::get_query_impl
  24: rustc_middle::ty::trait_def::<impl rustc_middle::ty::context::TyCtxt>::all_impls
  25: rustc_trait_selection::traits::specialize::specialization_graph_provider
  26: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::specialization_graph_of>::compute
  27: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  28: rustc_query_system::query::plumbing::get_query_impl
  29: rustc_middle::ty::trait_def::TraitDef::ancestors
  30: rustc_typeck::impl_wf_check::min_specialization::check_min_specialization
  31: <rustc_typeck::impl_wf_check::ImplWfCheck as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  32: rustc_middle::hir::map::Map::visit_item_likes_in_module
  33: rustc_typeck::impl_wf_check::check_mod_impl_wf
  34: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_mod_impl_wf>::compute
  35: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  36: rustc_query_system::query::plumbing::get_query_impl
  37: rustc_query_system::query::plumbing::ensure_query_impl
  38: rustc_typeck::impl_wf_check::impl_wf_check
  39: rustc_typeck::check_crate
  40: rustc_interface::passes::analysis
  41: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}
  44: rustc_query_system::query::plumbing::get_query_impl::{{closure}}
  45: rustc_query_system::query::plumbing::get_query_impl
  46: rustc_middle::ty::context::tls::enter_global
  47: rustc_interface::interface::create_compiler_and_run
  48: rustc_ast::attr::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.46.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z save-analysis -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no -C codegen-units=4 -C debuginfo=0 -C target-cpu=native -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C embed-bitcode=yes --crate-type dylib --crate-type rlib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
sccache: Compile terminated by signal 6====================>           ] 31/38: std
error: could not compile `std`.

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--features" "panic-unwind backtrace profiler compiler-builtins-c" "--manifest-path" "/home/matthias/vcs/github/rust/src/libtest/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
failed to run: /home/matthias/vcs/github/rust/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:00:01

@matthiaskrgr matthiaskrgr 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 Jul 15, 2020
@jonas-schievink jonas-schievink added the A-metadata Area: Crate metadata label Jul 15, 2020
@wesleywiser wesleywiser added the A-incr-comp Area: Incremental compilation label Jul 16, 2020
@JohnTitor JohnTitor added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 18, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 17, 2020

This seems like a duplicate of #76720.

@jyn514
Copy link
Member

jyn514 commented Dec 7, 2020

@matthiaskrgr have you run into this since filing the issue?

@matthiaskrgr
Copy link
Member Author

I think yes, but it was probably months ago and not recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation A-metadata Area: Crate metadata C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants