Skip to content

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

Description

@sylvestre

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metadataArea: Crate metadataC-bugCategory: This is a bug.T-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