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: panicked at compiler/rustc_metadata/src/dependency_format.rs:352:24: index out of bounds: the len is 124 but the index is 128 #126021

Closed
sylvestre opened this issue Jun 5, 2024 · 1 comment · Fixed by #126068
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@sylvestre
Copy link
Contributor

With:
rust version 1.80.0-nightly (a330e4959 2024-06-04)

I don't have a reproducer yet but we haven't been able to build the Rust coreutils with nightly for a few days


warning: unexpected `cfg` condition value: `expensive_tests`
    --> tests/common/util.rs:3319:20
     |
3319 |     #[cfg_attr(not(feature = "expensive_tests"), ignore)]
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: expected values for `feature` are: `arch`, `base32`, `base64`, `basename`, `basenc`, `cat`, `chcon`, `chgrp`, `chmod`, `chown`, `chroot`, `cksum`, `comm`, `cp`, `csplit`, `cut`, `date`, `dd`, `default`, `df`, `dir`, `dircolors`, `dirname`, `du`, `echo`, `env`, `expand`, `expr`, `factor`, `false`, `feat_Tier1`, `feat_acl`, `feat_common_core`, `feat_os_macos`, and `feat_os_unix` and 95 more
     = help: consider adding `expensive_tests` as a feature in `Cargo.toml`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
     = note: `#[warn(unexpected_cfgs)]` on by default
thread 'rustc' panicked at compiler/rustc_metadata/src/dependency_format.rs:352:24:
index out of bounds: the len is 124 but the index is 128
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a330e49593ee890f9197727a3a558b6e6b37f843/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/a330e49593ee890f9197727a3a558b6e6b37f843/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_bounds_check
             at /rustc/a330e49593ee890f9197727a3a558b6e6b37f843/library/core/src/panicking.rs:274:5
   3: <rustc_metadata::rmeta::decoder::cstore_impl::provide::{closure#5} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
      [... omitted 1 frame ...]
   4: rustc_codegen_ssa::base::allocator_kind_for_codegen
   5: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
      [... omitted 2 frames ...]
   6: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::CrateNum, rustc_middle::query::erase::Erased<[u8; 16]>>>
   7: <rustc_codegen_ssa::CrateInfo>::new
   8: rustc_codegen_ssa::back::write::start_async_codegen::<rustc_codegen_llvm::LlvmCodegenBackend>
   9: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  10: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  11: rustc_interface::passes::start_codegen
  12: <rustc_interface::queries::Queries>::codegen_and_build_linker
  13: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

Example:
https://github.com/uutils/coreutils/actions/runs/9381558110/job/25831059999?pr=6452

Maybe it is 711338b
from @petrochenkov

@sylvestre sylvestre added the C-bug Category: This is a bug. label Jun 5, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 5, 2024
@workingjubilee workingjubilee added A-metadata Area: Crate metadata A-incr-comp Area: Incremental compilation T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 5, 2024
@lqd
Copy link
Member

lqd commented Jun 5, 2024

This should be a duplicate of #125934, so I hoped this issue would also be fixed by #125493 (in particular because this reproduces locally as a compiler/rustc_codegen_ssa/src/back/link.rs:2700 panic instead, like all the other ICEs fixed by the PR), but it looks like it actually won't.

@saethlin saethlin removed A-incr-comp Area: Incremental compilation needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 6, 2024
fmease added a commit to fmease/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? `@petrochenkov`
`@bors` p=1
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? ``@petrochenkov``
``@bors`` p=1
@bors bors closed this as completed in 98489f2 Jun 6, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jun 7, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 13, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. 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.

5 participants