Skip to content

ICE building smallvec with coverage support (nightly-to-nightly regression) #135235

Closed
@RalfJung

Description

@RalfJung

Code

We tried building Miri with coverage support (-C instrument-coverage); see the CI logs here. This ICEs:

error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90: Failed to normalize [Alias(Projection, AliasTy { args: [A/#0], def_id: DefId(0:367 ~ smallvec[4893]::Array::Item), .. })], maybe try to call `try_normalize_erasing_regions` instead


thread 'rustc' panicked at compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:168:90:
Box<dyn Any>
stack backtrace:
   0:     0x7fc0b9ee2b6a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha3bc4f00e9e2c979
   1:     0x7fc0ba6135e6 - core::fmt::write::h83f200e99fb4dad4
   2:     0x7fc0bb4f02d1 - std::io::Write::write_fmt::h311c6b13b707fec1
   3:     0x7fc0b9ee29c2 - std::sys::backtrace::BacktraceLock::print::h51611c7078774653
   4:     0x7fc0b9ee4f67 - std::panicking::default_hook::{{closure}}::h16f1b5953b2fb1b0
   5:     0x7fc0b9ee4d50 - std::panicking::default_hook::h131593e803d8b280
   6:     0x7fc0b9054f38 - std[e634297ddf6551c]::panicking::update_hook::<alloc[e9a3c14938b4a821]::boxed::Box<rustc_driver_impl[6279f07e99aa1d2f]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7fc0b9ee57b3 - std::panicking::rust_panic_with_hook::he5a9310ec54a4e64
   8:     0x7fc0b908dcc1 - std[e634297ddf6551c]::panicking::begin_panic::<rustc_errors[3190855cc9e4054c]::ExplicitBug>::{closure#0}
   9:     0x7fc0b9082ea6 - std[e634297ddf6551c]::sys::backtrace::__rust_end_short_backtrace::<std[e634297ddf6551c]::panicking::begin_panic<rustc_errors[3190855cc9e4054c]::ExplicitBug>::{closure#0}, !>
  10:     0x7fc0b907f9b9 - std[e634297ddf6551c]::panicking::begin_panic::<rustc_errors[3190855cc9e4054c]::ExplicitBug>
  11:     0x7fc0b9097c21 - <rustc_errors[3190855cc9e4054c]::diagnostic::BugAbort as rustc_errors[3190855cc9e4054c]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7fc0b966c173 - rustc_middle[30b20b3db7b50d0c]::util::bug::opt_span_bug_fmt::<rustc_span[a32104fbac3839e4]::span_encoding::Span>::{closure#0}
  13:     0x7fc0b965117a - rustc_middle[30b20b3db7b50d0c]::ty::context::tls::with_opt::<rustc_middle[30b20b3db7b50d0c]::util::bug::opt_span_bug_fmt<rustc_span[a32104fbac3839e4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7fc0b965100b - rustc_middle[30b20b3db7b50d0c]::ty::context::tls::with_context_opt::<rustc_middle[30b20b3db7b50d0c]::ty::context::tls::with_opt<rustc_middle[30b20b3db7b50d0c]::util::bug::opt_span_bug_fmt<rustc_span[a32104fbac3839e4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7fc0b7908240 - rustc_middle[30b20b3db7b50d0c]::util::bug::bug_fmt
  16:     0x7fc0bac3396f - <rustc_middle[30b20b3db7b50d0c]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[c3559ba0b6d341e0]::fold::TypeFolder<rustc_middle[30b20b3db7b50d0c]::ty::context::TyCtxt>>::fold_ty
  17:     0x7fc0bb8900f6 - <&rustc_middle[30b20b3db7b50d0c]::ty::list::RawList<(), rustc_middle[30b20b3db7b50d0c]::ty::generic_args::GenericArg> as rustc_type_ir[c3559ba0b6d341e0]::fold::TypeFoldable<rustc_middle[30b20b3db7b50d0c]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[30b20b3db7b50d0c]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder>
  18:     0x7fc0b9baece5 - <rustc_middle[30b20b3db7b50d0c]::ty::context::TyCtxt>::normalize_erasing_regions::<rustc_type_ir[c3559ba0b6d341e0]::predicate::TraitRef<rustc_middle[30b20b3db7b50d0c]::ty::context::TyCtxt>>
  19:     0x7fc0b9bbba15 - <rustc_symbol_mangling[91c82856261a6258]::v0::SymbolMangler as rustc_middle[30b20b3db7b50d0c]::ty::print::Printer>::print_impl_path
  20:     0x7fc0b9bbaf59 - <rustc_symbol_mangling[91c82856261a6258]::v0::SymbolMangler as rustc_middle[30b20b3db7b50d0c]::ty::print::Printer>::print_def_path
  21:     0x7fc0b9bbb645 - <rustc_symbol_mangling[91c82856261a6258]::v0::SymbolMangler as rustc_middle[30b20b3db7b50d0c]::ty::print::Printer>::print_def_path
  22:     0x7fc0b9bbaa70 - rustc_symbol_mangling[91c82856261a6258]::v0::mangle
  23:     0x7fc0baf2862d - rustc_symbol_mangling[91c82856261a6258]::symbol_name_provider
  24:     0x7fc0baf270aa - rustc_query_impl[7c1ec1df0b776991]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7c1ec1df0b776991]::query_impl::symbol_name::dynamic_query::{closure#2}::{closure#0}, rustc_middle[30b20b3db7b50d0c]::query::erase::Erased<[u8; 16usize]>>
  25:     0x7fc0baf26037 - rustc_query_system[644fd28009304888]::query::plumbing::try_execute_query::<rustc_query_impl[7c1ec1df0b776991]::DynamicConfig<rustc_query_system[644fd28009304888]::query::caches::DefaultCache<rustc_middle[30b20b3db7b50d0c]::ty::instance::Instance, rustc_middle[30b20b3db7b50d0c]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[7c1ec1df0b776991]::plumbing::QueryCtxt, false>
  26:     0x7fc0baf25ca2 - rustc_query_impl[7c1ec1df0b776991]::query_impl::symbol_name::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7fc0bb12d98c - rustc_middle[30b20b3db7b50d0c]::query::plumbing::query_get_at::<rustc_query_system[644fd28009304888]::query::caches::DefaultCache<rustc_middle[30b20b3db7b50d0c]::ty::instance::Instance, rustc_middle[30b20b3db7b50d0c]::query::erase::Erased<[u8; 16usize]>>>
  28:     0x7fc0b8edc815 - rustc_codegen_llvm[b43b4fa4a9a79a5]::coverageinfo::mapgen::finalize
  29:     0x7fc0bb55cbd8 - rustc_codegen_llvm[b43b4fa4a9a79a5]::base::compile_codegen_unit::module_codegen
  30:     0x7fc0bb5506c8 - <rustc_codegen_llvm[b43b4fa4a9a79a5]::LlvmCodegenBackend as rustc_codegen_ssa[4631c4d6409aa8ac]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  31:     0x7fc0bb54caec - <rustc_codegen_llvm[b43b4fa4a9a79a5]::LlvmCodegenBackend as rustc_codegen_ssa[4631c4d6409aa8ac]::traits::backend::CodegenBackend>::codegen_crate
  32:     0x7fc0bb5f96a4 - <rustc_interface[412687b4afbff3a1]::queries::Linker>::codegen_and_build_linker
  33:     0x7fc0bb5ef012 - rustc_interface[412687b4afbff3a1]::passes::create_and_enter_global_ctxt::<core[8295d53c64f43325]::option::Option<rustc_interface[412687b4afbff3a1]::queries::Linker>, rustc_driver_impl[6279f07e99aa1d2f]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  34:     0x7fc0bb5295a4 - rustc_interface[412687b4afbff3a1]::interface::run_compiler::<(), rustc_driver_impl[6279f07e99aa1d2f]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7fc0bb4026c7 - std[e634297ddf6551c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[412687b4afbff3a1]::util::run_in_thread_with_globals<rustc_interface[412687b4afbff3a1]::util::run_in_thread_pool_with_globals<rustc_interface[412687b4afbff3a1]::interface::run_compiler<(), rustc_driver_impl[6279f07e99aa1d2f]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:     0x7fc0bb402b64 - <<std[e634297ddf6551c]::thread::Builder>::spawn_unchecked_<rustc_interface[412687b4afbff3a1]::util::run_in_thread_with_globals<rustc_interface[412687b4afbff3a1]::util::run_in_thread_pool_with_globals<rustc_interface[412687b4afbff3a1]::interface::run_compiler<(), rustc_driver_impl[6279f07e99aa1d2f]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[8295d53c64f43325]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7fc0bb404141 - std::sys::pal::unix::thread::Thread::new::thread_start::h8f1e830f9e043eda
  38:     0x7fc0b569ca94 - <unknown>
  39:     0x7fc0b5729c3c - <unknown>
  40:                0x0 - <unknown>

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smallvec-1.13.2/rustc-ice-2025-01-08T04_48_32-3573.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=2 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on -C link-args=-Wl,-rpath,/home/runner/.rustup/toolchains/miri/lib/rustlib/x86_64-unknown-linux-gnu/lib -Z unstable-options -C instrument-coverage

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

query stack during panic:
#0 [symbol_name] computing the symbol for `<impl at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smallvec-1.13.2/src/lib.rs:1864:1: 1864:48>::as_ref`
end of query stack
error: could not compile `smallvec` (lib)

Regression range: ad211ce...0707499

Metadata

Metadata

Labels

A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions