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

opaque.rs index out of bounds #107441

Closed
blyxyas opened this issue Jan 29, 2023 · 2 comments
Closed

opaque.rs index out of bounds #107441

blyxyas opened this issue Jan 29, 2023 · 2 comments
Labels
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.

Comments

@blyxyas
Copy link
Member

blyxyas commented Jan 29, 2023

rust/compiler/rustc_serialize/src/opaque.rs:594:21 produces the following error when building some of the crates.

Relevant output
Compiling unicode-xid v0.2.4
thread 'rustc' panicked at 'index out of bounds: the len is 83964 but the index is 83964', /home/alejandra/git/rust/compiler/rustc_serialize/src/opaque.rs:594:21
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: <bool as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   4: <rustc_metadata::rmeta::CrateRoot as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   5: <rustc_metadata::rmeta::decoder::MetadataBlob>::get_root
   6: <rustc_metadata::locator::CrateLocator>::extract_one
   7: <rustc_metadata::locator::CrateLocator>::extract_lib
   8: <rustc_metadata::locator::CrateLocator>::find_library_crate
   9: <rustc_metadata::locator::CrateLocator>::maybe_load_library_crate
  10: <rustc_metadata::creader::CrateLoader>::load
  11: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  12: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  13: <rustc_metadata::creader::CrateLoader>::maybe_process_path_extern
  14: <rustc_resolve::Resolver>::extern_prelude_get
  15: <rustc_resolve::Resolver>::visit_scopes::<core::result::Result<&rustc_resolve::NameBinding, rustc_resolve::Determinacy>, <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope::{closure#0}>
  16: <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  17: <rustc_resolve::Resolver>::resolve_path_with_ribs
  18: <rustc_resolve::Resolver>::maybe_resolve_path
  19: <rustc_resolve::imports::ImportResolver>::resolve_imports
  20: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  21: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  22: <rustc_expand::expand::MacroExpander>::expand_crate
  23: <rustc_session::session::Session>::time::<core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>, rustc_interface::passes::configure_and_expand::{closure#1}>
  24: rustc_interface::passes::configure_and_expand
  25: <rustc_interface::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface::queries::Queries>::expansion::{closure#0}::{closure#0}, core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>>
  26: <rustc_interface::queries::Query<(alloc::rc::Rc<rustc_ast::ast::Crate>, alloc::rc::Rc<core::cell::RefCell<rustc_interface::passes::boxed_resolver::BoxedResolver>>, alloc::rc::Rc<rustc_lint::context::LintStore>)>>::compute::<<rustc_interface::queries::Queries>::expansion::{closure#0}>
  27: <rustc_interface::queries::Queries>::expansion
  28: <rustc_interface::queries::Query<rustc_interface::passes::QueryContext>>::compute::<<rustc_interface::queries::Queries>::global_ctxt::{closure#0}>
  29: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  30: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  31: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.69.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
end of query stack
Full output
 ~/git/rust  master ⇡1 !4 ▓▒░ x test src/tools/cargotest                                                                                                                                               ░▒▓ 1 х  59s
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.05s
Building stage0 library artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 1.05s
Copying stage0 library 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)
   Compiling rustc_middle v0.0.0 (/home/alejandra/git/rust/compiler/rustc_middle)
   Compiling rustc_infer v0.0.0 (/home/alejandra/git/rust/compiler/rustc_infer)
   Compiling rustc_mir_dataflow v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_dataflow)
   Compiling rustc_metadata v0.0.0 (/home/alejandra/git/rust/compiler/rustc_metadata)
   Compiling rustc_incremental v0.0.0 (/home/alejandra/git/rust/compiler/rustc_incremental)
   Compiling rustc_symbol_mangling v0.0.0 (/home/alejandra/git/rust/compiler/rustc_symbol_mangling)
   Compiling rustc_ast_lowering v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ast_lowering)
   Compiling rustc_passes v0.0.0 (/home/alejandra/git/rust/compiler/rustc_passes)
   Compiling rustc_query_impl v0.0.0 (/home/alejandra/git/rust/compiler/rustc_query_impl)
   Compiling rustc_monomorphize v0.0.0 (/home/alejandra/git/rust/compiler/rustc_monomorphize)
   Compiling rustc_save_analysis v0.0.0 (/home/alejandra/git/rust/compiler/rustc_save_analysis)
   Compiling rustc_resolve v0.0.0 (/home/alejandra/git/rust/compiler/rustc_resolve)
   Compiling rustc_transmute v0.1.0 (/home/alejandra/git/rust/compiler/rustc_transmute)
   Compiling rustc_trait_selection v0.0.0 (/home/alejandra/git/rust/compiler/rustc_trait_selection)
   Compiling rustc_lint v0.0.0 (/home/alejandra/git/rust/compiler/rustc_lint)
   Compiling rustc_const_eval v0.0.0 (/home/alejandra/git/rust/compiler/rustc_const_eval)
   Compiling rustc_traits v0.0.0 (/home/alejandra/git/rust/compiler/rustc_traits)
   Compiling rustc_mir_build v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_build)
   Compiling rustc_ty_utils v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ty_utils)
   Compiling rustc_hir_analysis v0.0.0 (/home/alejandra/git/rust/compiler/rustc_hir_analysis)
   Compiling rustc_plugin_impl v0.0.0 (/home/alejandra/git/rust/compiler/rustc_plugin_impl)
   Compiling rustc_codegen_ssa v0.0.0 (/home/alejandra/git/rust/compiler/rustc_codegen_ssa)
   Compiling rustc_borrowck v0.0.0 (/home/alejandra/git/rust/compiler/rustc_borrowck)
   Compiling rustc_mir_transform v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_transform)
   Compiling rustc_hir_typeck v0.1.0 (/home/alejandra/git/rust/compiler/rustc_hir_typeck)
   Compiling rustc_privacy v0.0.0 (/home/alejandra/git/rust/compiler/rustc_privacy)
   Compiling rustc_codegen_llvm v0.0.0 (/home/alejandra/git/rust/compiler/rustc_codegen_llvm)
   Compiling rustc_interface v0.0.0 (/home/alejandra/git/rust/compiler/rustc_interface)
   Compiling rustc_driver v0.0.0 (/home/alejandra/git/rust/compiler/rustc_driver)
   Compiling rustc_smir v0.0.0 (/home/alejandra/git/rust/compiler/rustc_smir)
   Compiling rustc-main v0.0.0 (/home/alejandra/git/rust/compiler/rustc)
    Finished release [optimized] target(s) in 2m 34s
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 library artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling compiler_builtins v0.1.85
   Compiling core v0.0.0 (/home/alejandra/git/rust/library/core)
   Compiling libc v0.2.138
   Compiling cc v1.0.77
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/home/alejandra/git/rust/library/std)
   Compiling unwind v0.0.0 (/home/alejandra/git/rust/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/home/alejandra/git/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/alejandra/git/rust/library/alloc)
   Compiling cfg-if v1.0.0
   Compiling adler v1.0.2
   Compiling rustc-demangle v0.1.21
   Compiling rustc-std-workspace-alloc v1.99.0 (/home/alejandra/git/rust/library/rustc-std-workspace-alloc)
   Compiling panic_abort v0.0.0 (/home/alejandra/git/rust/library/panic_abort)
   Compiling panic_unwind v0.0.0 (/home/alejandra/git/rust/library/panic_unwind)
   Compiling gimli v0.26.2
   Compiling std_detect v0.1.5 (/home/alejandra/git/rust/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.12.3
   Compiling miniz_oxide v0.5.3
   Compiling object v0.29.0
   Compiling addr2line v0.17.0
   Compiling rustc-std-workspace-std v1.99.0 (/home/alejandra/git/rust/library/rustc-std-workspace-std)
   Compiling proc_macro v0.0.0 (/home/alejandra/git/rust/library/proc_macro)
   Compiling unicode-width v0.1.10
   Compiling getopts v0.2.21
   Compiling test v0.0.0 (/home/alejandra/git/rust/library/test)
    Finished release [optimized] target(s) in 57.94s
Copying stage1 library from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling proc-macro2 v1.0.46
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.102
   Compiling cfg-if v1.0.0
   Compiling unicode-xid v0.2.4
   Compiling serde v1.0.147
   Compiling serde_derive v1.0.147
   Compiling libc v0.2.138
   Compiling version_check v0.9.4
   Compiling once_cell v1.16.0
   Compiling autocfg v1.1.0
   Compiling stable_deref_trait v1.2.0
   Compiling proc-macro-hack v0.5.19
   Compiling smallvec v1.8.1
   Compiling log v0.4.14
   Compiling thiserror v1.0.38
   Compiling parking_lot_core v0.8.5
   Compiling ahash v0.7.4
   Compiling cc v1.0.77
   Compiling memchr v2.5.0
   Compiling indexmap v1.9.2
   Compiling lock_api v0.4.7
   Compiling tracing-core v0.1.28
   Compiling instant v0.1.12
   Compiling scopeguard v1.1.0
   Compiling pin-project-lite v0.2.8
   Compiling rustc-hash v1.1.0
   Compiling typenum v1.16.0
   Compiling generic-array v0.14.4
   Compiling bitflags v1.3.2
   Compiling type-map v0.4.0
   Compiling self_cell v0.10.2
   Compiling unicode-width v0.1.10
   Compiling annotate-snippets v0.9.1
   Compiling ena v0.14.0
   Compiling thin-vec v0.2.9
   Compiling remove_dir_all v0.5.3
   Compiling fastrand v1.8.0
   Compiling arrayvec v0.7.0
   Compiling rustc_graphviz v0.0.0 (/home/alejandra/git/rust/compiler/rustc_graphviz)
   Compiling getrandom v0.2.8
   Compiling perf-event-open-sys v1.0.1
   Compiling memmap2 v0.2.1
   Compiling tempfile v3.3.0
   Compiling parking_lot v0.11.2
   Compiling jobserver v0.1.24
   Compiling hashbrown v0.12.3
   Compiling psm v0.1.21
   Compiling stacker v0.1.15
   Compiling measureme v10.1.0
   Compiling cpufeatures v0.2.5
   Compiling rand_core v0.6.4
   Compiling rustc_arena v0.0.0 (/home/alejandra/git/rust/compiler/rustc_arena)
   Compiling litemap v0.6.0
   Compiling writeable v0.5.0
   Compiling unic-char-range v0.9.0
   Compiling unic-common v0.9.0
   Compiling scoped-tls v1.0.0
   Compiling unic-ucd-version v0.9.0
   Compiling unic-char-property v0.9.0
   Compiling ppv-lite86 v0.2.8
   Compiling unic-emoji-char v0.9.0
   Compiling ryu v1.0.5
   Compiling regex-automata v0.2.0
   Compiling rustc_lexer v0.1.0 (/home/alejandra/git/rust/compiler/rustc_lexer)
   Compiling serde_json v1.0.85
   Compiling rand_xoshiro v0.6.0
   Compiling itoa v1.0.2
   Compiling odht v0.3.1
   Compiling termize v0.1.1
   Compiling rand_chacha v0.3.0
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.3
   Compiling getopts v0.2.21
   Compiling rustc_fs_util v0.0.0 (/home/alejandra/git/rust/compiler/rustc_fs_util)
   Compiling either v1.6.0
   Compiling convert_case v0.4.0
   Compiling rand v0.8.5
   Compiling datafrog v2.0.1
   Compiling crypto-common v0.1.6
   Compiling rustc_serialize v0.0.0 (/home/alejandra/git/rust/compiler/rustc_serialize)
   Compiling block-buffer v0.10.2
   Compiling rustc_apfloat v0.0.0 (/home/alejandra/git/rust/compiler/rustc_apfloat)
   Compiling tinyvec_macros v0.1.0
   Compiling tinyvec v1.6.0
   Compiling digest v0.10.6
   Compiling polonius-engine v0.13.0
   Compiling regex-syntax v0.6.26
   Compiling itertools v0.10.5
   Compiling aho-corasick v0.7.18
   Compiling sha1 v0.10.5
   Compiling sha2 v0.10.6
   Compiling md-5 v0.10.0
   Compiling crossbeam-utils v0.8.14
   Compiling sharded-slab v0.1.1
   Compiling tracing-log v0.1.2
   Compiling ahash v0.8.2
   Compiling thread_local v1.1.4
   Compiling ansi_term v0.12.1
   Compiling snap v1.1.0
   Compiling unicode-normalization v0.1.22
   Compiling crc32fast v1.3.2
   Compiling atty v0.2.14
   Compiling crossbeam-channel v0.5.6
   Compiling unicode-script v0.5.5
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.5.3
   Compiling libloading v0.7.1
   Compiling unicode-security v0.1.0
   Compiling fixedbitset v0.2.0
   Compiling fallible-iterator v0.2.0
   Compiling petgraph v0.5.1
   Compiling flate2 v1.0.23
   Compiling hashbrown v0.13.1
   Compiling static_assertions v1.1.0
   Compiling rustc_llvm v0.0.0 (/home/alejandra/git/rust/compiler/rustc_llvm)
   Compiling regex v1.5.6
   Compiling regex-automata v0.1.10
   Compiling gimli v0.26.2
   Compiling twox-hash v1.6.3
   Compiling object v0.29.0
   Compiling punycode v0.4.1
   Compiling object v0.30.1
   Compiling rustc-demangle v0.1.21
   Compiling pathdiff v0.2.1
   Compiling synstructure v0.12.6
   Compiling matchers v0.1.0
   Compiling cstr v0.2.8
   Compiling rustc_error_codes v0.0.0 (/home/alejandra/git/rust/compiler/rustc_error_codes)
   Compiling rustc-main v0.0.0 (/home/alejandra/git/rust/compiler/rustc)
   Compiling zerofrom-derive v0.1.1
   Compiling yoke-derive v0.6.1
   Compiling zerovec-derive v0.9.0
   Compiling displaydoc v0.2.3
   Compiling thiserror-impl v1.0.38
   Compiling tracing-attributes v0.1.22
   Compiling icu_provider_macros v1.0.0
   Compiling chalk-derive v0.87.0
   Compiling tracing v0.1.35
   Compiling derive_more v0.99.17
   Compiling fluent-syntax v0.11.0
   Compiling zerofrom v0.1.1
   Compiling tracing-subscriber v0.3.3
   Compiling thorin-dwp v0.4.0
   Compiling ar_archive_writer v0.1.1
   Compiling chalk-ir v0.87.0
   Compiling tracing-tree v0.2.0
   Compiling rustc_log v0.0.0 (/home/alejandra/git/rust/compiler/rustc_log)
   Compiling chalk-solve v0.87.0
   Compiling chalk-engine v0.87.0
   Compiling yoke v0.6.2
   Compiling zerovec v0.9.0
   Compiling gsgdt v0.1.2
   Compiling rls-span v0.5.3
   Compiling rls-data v0.19.1
   Compiling tinystr v0.7.0
   Compiling unic-langid-impl v0.9.1
   Compiling unic-langid-macros-impl v0.9.1
   Compiling icu_locid v1.0.0
   Compiling unic-langid-macros v0.9.1
   Compiling unic-langid v0.9.1
   Compiling intl_pluralrules v7.0.2
   Compiling fluent-langneg v0.13.0
   Compiling intl-memoizer v0.5.1
   Compiling icu_provider v1.0.1
   Compiling fluent-bundle v0.15.2
   Compiling icu_provider_adapters v1.0.0
   Compiling icu_list v1.0.0
   Compiling rustc_baked_icu_data v0.0.0 (/home/alejandra/git/rust/compiler/rustc_baked_icu_data)
   Compiling rustc_macros v0.1.0 (/home/alejandra/git/rust/compiler/rustc_macros)
   Compiling rustc_index v0.0.0 (/home/alejandra/git/rust/compiler/rustc_index)
   Compiling rustc_data_structures v0.0.0 (/home/alejandra/git/rust/compiler/rustc_data_structures)
   Compiling rustc_span v0.0.0 (/home/alejandra/git/rust/compiler/rustc_span)
   Compiling rustc_abi v0.0.0 (/home/alejandra/git/rust/compiler/rustc_abi)
   Compiling rustc_parse_format v0.0.0 (/home/alejandra/git/rust/compiler/rustc_parse_format)
   Compiling rustc_type_ir v0.0.0 (/home/alejandra/git/rust/compiler/rustc_type_ir)
   Compiling rustc_feature v0.0.0 (/home/alejandra/git/rust/compiler/rustc_feature)
   Compiling rustc_ast v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ast)
   Compiling rustc_error_messages v0.0.0 (/home/alejandra/git/rust/compiler/rustc_error_messages)
   Compiling rustc_target v0.0.0 (/home/alejandra/git/rust/compiler/rustc_target)
   Compiling rustc_ast_pretty v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/home/alejandra/git/rust/compiler/rustc_hir)
   Compiling rustc_lint_defs v0.0.0 (/home/alejandra/git/rust/compiler/rustc_lint_defs)
   Compiling rustc_hir_pretty v0.0.0 (/home/alejandra/git/rust/compiler/rustc_hir_pretty)
   Compiling rustc_errors v0.0.0 (/home/alejandra/git/rust/compiler/rustc_errors)
   Compiling rustc_session v0.0.0 (/home/alejandra/git/rust/compiler/rustc_session)
   Compiling rustc_attr v0.0.0 (/home/alejandra/git/rust/compiler/rustc_attr)
   Compiling rustc_query_system v0.0.0 (/home/alejandra/git/rust/compiler/rustc_query_system)
   Compiling rustc_parse v0.0.0 (/home/alejandra/git/rust/compiler/rustc_parse)
   Compiling rustc_middle v0.0.0 (/home/alejandra/git/rust/compiler/rustc_middle)
   Compiling rustc_ast_passes v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ast_passes)
   Compiling rustc_expand v0.0.0 (/home/alejandra/git/rust/compiler/rustc_expand)
   Compiling rustc_builtin_macros v0.0.0 (/home/alejandra/git/rust/compiler/rustc_builtin_macros)
   Compiling rustc_infer v0.0.0 (/home/alejandra/git/rust/compiler/rustc_infer)
   Compiling rustc_mir_dataflow v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_dataflow)
   Compiling rustc_metadata v0.0.0 (/home/alejandra/git/rust/compiler/rustc_metadata)
   Compiling rustc_symbol_mangling v0.0.0 (/home/alejandra/git/rust/compiler/rustc_symbol_mangling)
   Compiling rustc_incremental v0.0.0 (/home/alejandra/git/rust/compiler/rustc_incremental)
   Compiling rustc_ast_lowering v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ast_lowering)
   Compiling rustc_query_impl v0.0.0 (/home/alejandra/git/rust/compiler/rustc_query_impl)
   Compiling rustc_monomorphize v0.0.0 (/home/alejandra/git/rust/compiler/rustc_monomorphize)
   Compiling rustc_passes v0.0.0 (/home/alejandra/git/rust/compiler/rustc_passes)
   Compiling rustc_save_analysis v0.0.0 (/home/alejandra/git/rust/compiler/rustc_save_analysis)
   Compiling rustc_resolve v0.0.0 (/home/alejandra/git/rust/compiler/rustc_resolve)
   Compiling rustc_transmute v0.1.0 (/home/alejandra/git/rust/compiler/rustc_transmute)
   Compiling rustc_trait_selection v0.0.0 (/home/alejandra/git/rust/compiler/rustc_trait_selection)
   Compiling rustc_const_eval v0.0.0 (/home/alejandra/git/rust/compiler/rustc_const_eval)
   Compiling rustc_lint v0.0.0 (/home/alejandra/git/rust/compiler/rustc_lint)
   Compiling rustc_traits v0.0.0 (/home/alejandra/git/rust/compiler/rustc_traits)
   Compiling rustc_mir_build v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_build)
   Compiling rustc_ty_utils v0.0.0 (/home/alejandra/git/rust/compiler/rustc_ty_utils)
   Compiling rustc_hir_analysis v0.0.0 (/home/alejandra/git/rust/compiler/rustc_hir_analysis)
   Compiling rustc_plugin_impl v0.0.0 (/home/alejandra/git/rust/compiler/rustc_plugin_impl)
   Compiling rustc_codegen_ssa v0.0.0 (/home/alejandra/git/rust/compiler/rustc_codegen_ssa)
   Compiling rustc_borrowck v0.0.0 (/home/alejandra/git/rust/compiler/rustc_borrowck)
   Compiling rustc_mir_transform v0.0.0 (/home/alejandra/git/rust/compiler/rustc_mir_transform)
   Compiling rustc_privacy v0.0.0 (/home/alejandra/git/rust/compiler/rustc_privacy)
   Compiling rustc_hir_typeck v0.1.0 (/home/alejandra/git/rust/compiler/rustc_hir_typeck)
   Compiling rustc_codegen_llvm v0.0.0 (/home/alejandra/git/rust/compiler/rustc_codegen_llvm)
   Compiling rustc_interface v0.0.0 (/home/alejandra/git/rust/compiler/rustc_interface)
   Compiling rustc_driver v0.0.0 (/home/alejandra/git/rust/compiler/rustc_driver)
   Compiling rustc_smir v0.0.0 (/home/alejandra/git/rust/compiler/rustc_smir)
    Finished release [optimized] target(s) in 3m 43s
Copying stage1 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 tool cargo (x86_64-unknown-linux-gnu)
   Compiling libc v0.2.138
   Compiling cfg-if v1.0.0
   Compiling pkg-config v0.3.25
   Compiling version_check v0.9.4
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.46
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.102
   Compiling typenum v1.16.0
   Compiling serde_derive v1.0.147
   Compiling serde v1.0.147
   Compiling subtle v2.4.1
   Compiling memchr v2.5.0
   Compiling zeroize v1.5.7
   Compiling bitflags v1.3.2
   Compiling log v0.4.14
   Compiling base64ct v1.5.3
   Compiling tinyvec_macros v0.1.0
   Compiling generic-array v0.14.4
   Compiling const-oid v0.9.1
   Compiling crc32fast v1.3.2
   Compiling matches v0.1.8
   Compiling tinyvec v1.6.0
   Compiling ryu v1.0.5
   Compiling pem-rfc7468 v0.6.0
   Compiling once_cell v1.16.0
   Compiling unicode-bidi v0.3.4
   Compiling proc-macro-error-attr v1.0.4
   Compiling der v0.6.1
   Compiling aho-corasick v0.7.18
   Compiling itoa v1.0.2
   Compiling percent-encoding v2.1.0
   Compiling regex-syntax v0.6.26
   Compiling io-lifetimes v1.0.3
   Compiling serde_json v1.0.85
   Compiling unicode-normalization v0.1.22
   Compiling form_urlencoded v1.0.1
   Compiling indexmap v1.9.2
   Compiling proc-macro-error v1.0.4
   Compiling base16ct v0.1.1
   Compiling lazy_static v1.4.0
   Compiling getrandom v0.2.8
   Compiling rustix v0.36.5
   Compiling jobserver v0.1.24
   Compiling rand_core v0.6.4
   Compiling cc v1.0.77
   Compiling spki v0.6.0
   Compiling idna v0.2.0
   Compiling pkcs8 v0.9.0
   Compiling ff v0.12.1
   Compiling anyhow v1.0.65
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.2
   Compiling crypto-bigint v0.4.9
   Compiling regex-automata v0.1.10
   Compiling os_str_bytes v6.0.0
   Compiling digest v0.10.6
   Compiling bstr v0.2.17
   Compiling group v0.12.1
   Compiling hmac v0.12.1
   Compiling sec1 v0.3.0
   Compiling regex v1.5.6
   Compiling hkdf v0.12.3
   Compiling libz-sys v1.1.3
   Compiling openssl-sys v0.9.72
   Compiling libnghttp2-sys v0.1.4+1.41.0
   Compiling libssh2-sys v0.2.23
   Compiling curl-sys v0.4.59+curl-7.86.0
   Compiling libgit2-sys v0.14.1+1.5.0
   Compiling num-traits v0.2.12
   Compiling termcolor v1.1.3
   Compiling openssl v0.10.38
   Compiling linux-raw-sys v0.1.4
   Compiling cpufeatures v0.2.5
   Compiling foreign-types-shared v0.1.1
   Compiling curl v0.4.44
   Compiling hashbrown v0.12.3
   Compiling openssl-probe v0.1.5
   Compiling foreign-types v0.3.2
   Compiling elliptic-curve v0.12.3
   Compiling rfc6979 v0.3.1
   Compiling signature v1.6.4
   Compiling filetime v0.2.14
   Compiling socket2 v0.4.1
   Compiling same-file v1.0.6
   Compiling strsim v0.10.0
   Compiling heck v0.4.0
   Compiling crossbeam-utils v0.8.14
   Compiling ppv-lite86 v0.2.8
   Compiling walkdir v2.3.2
   Compiling ecdsa v0.14.8
   Compiling tar v0.4.38
   Compiling flate2 v1.0.23
   Compiling rand_chacha v0.3.0
   Compiling sha2 v0.10.6
   Compiling clap_lex v0.2.2
   Compiling clap_derive v3.2.18
   Compiling atty v0.2.14
   Compiling bitmaps v2.1.0
   Compiling im-rc v15.1.0
   Compiling fastrand v1.8.0
   Compiling fnv v1.0.7
   Compiling either v1.6.0
   Compiling utf8parse v0.1.1
   Compiling is-terminal v0.4.2
   Compiling semver v1.0.12
   Compiling hex v0.3.2
   Compiling http-auth v0.1.6
   Compiling bytes v1.0.1
   Compiling textwrap v0.15.0
   Compiling remove_dir_all v0.5.3
   Compiling static_assertions v1.1.0
   Compiling time-core v0.1.0
   Compiling fiat-crypto v0.1.17
   Compiling time v0.3.17
   Compiling kstring v2.0.0
   Compiling sized-chunks v0.6.4
   Compiling combine v4.6.6
   Compiling tempfile v3.3.0
   Compiling ordered-float v2.10.0
   Compiling vte v0.3.3
   Compiling itertools v0.10.5
   Compiling globset v0.4.9
   Compiling cargo v0.69.0 (/home/alejandra/git/rust/src/tools/cargo)
   Compiling crypto-hash v0.3.4
   Compiling p384 v0.11.2
   Compiling rand v0.8.5
   Compiling clap v3.2.20
   Compiling clap_lex v0.3.0
   Compiling rand_xoshiro v0.6.0
   Compiling ed25519-compact v2.0.4
   Compiling thread_local v1.1.4
   Compiling ct-codecs v1.1.1
   Compiling humantime v2.0.1
   Compiling shell-escape v0.1.5
   Compiling hex v0.4.2
   Compiling env_logger v0.10.0
   Compiling ignore v0.4.18
   Compiling cargo-util v0.2.3 (/home/alejandra/git/rust/src/tools/cargo/crates/cargo-util)
   Compiling clap v4.1.4
   Compiling strip-ansi-escapes v0.1.0
   Compiling sha1 v0.10.5
   Compiling opener v0.5.0
   Compiling pathdiff v0.2.1
   Compiling glob v0.3.0
   Compiling base64 v0.13.1
   Compiling home v0.5.3
   Compiling unicode-width v0.1.10
   Compiling lazycell v1.3.0
   Compiling bytesize v1.0.1
   Compiling unicode-xid v0.2.4
thread 'rustc' panicked at 'index out of bounds: the len is 83964 but the index is 83964', /home/alejandra/git/rust/compiler/rustc_serialize/src/opaque.rs:594:21
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: <bool as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   4: <rustc_metadata::rmeta::CrateRoot as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   5: <rustc_metadata::rmeta::decoder::MetadataBlob>::get_root
   6: <rustc_metadata::locator::CrateLocator>::extract_one
   7: <rustc_metadata::locator::CrateLocator>::extract_lib
   8: <rustc_metadata::locator::CrateLocator>::find_library_crate
   9: <rustc_metadata::locator::CrateLocator>::maybe_load_library_crate
  10: <rustc_metadata::creader::CrateLoader>::load
  11: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  12: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  13: <rustc_metadata::creader::CrateLoader>::maybe_process_path_extern
  14: <rustc_resolve::Resolver>::extern_prelude_get
  15: <rustc_resolve::Resolver>::visit_scopes::<core::result::Result<&rustc_resolve::NameBinding, rustc_resolve::Determinacy>, <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope::{closure#0}>
  16: <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  17: <rustc_resolve::Resolver>::resolve_path_with_ribs
  18: <rustc_resolve::Resolver>::maybe_resolve_path
  19: <rustc_resolve::imports::ImportResolver>::resolve_imports
  20: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  21: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  22: <rustc_expand::expand::MacroExpander>::expand_crate
  23: <rustc_session::session::Session>::time::<core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>, rustc_interface::passes::configure_and_expand::{closure#1}>
  24: rustc_interface::passes::configure_and_expand
  25: <rustc_interface::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface::queries::Queries>::expansion::{closure#0}::{closure#0}, core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>>
  26: <rustc_interface::queries::Query<(alloc::rc::Rc<rustc_ast::ast::Crate>, alloc::rc::Rc<core::cell::RefCell<rustc_interface::passes::boxed_resolver::BoxedResolver>>, alloc::rc::Rc<rustc_lint::context::LintStore>)>>::compute::<<rustc_interface::queries::Queries>::expansion::{closure#0}>
  27: <rustc_interface::queries::Queries>::expansion
  28: <rustc_interface::queries::Query<rustc_interface::passes::QueryContext>>::compute::<<rustc_interface::queries::Queries>::global_ctxt::{closure#0}>
  29: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  30: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  31: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.69.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
end of query stack
   Compiling url v2.2.2
   Compiling orion v0.17.3
error: could not compile `serde_json`
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'index out of bounds: the len is 83964 but the index is 83964', /home/alejandra/git/rust/compiler/rustc_serialize/src/opaque.rs:594:21
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: <bool as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   4: <rustc_metadata::rmeta::CrateRoot as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   5: <rustc_metadata::rmeta::decoder::MetadataBlob>::get_root
   6: <rustc_metadata::locator::CrateLocator>::extract_one
   7: <rustc_metadata::locator::CrateLocator>::extract_lib
   8: <rustc_metadata::locator::CrateLocator>::find_library_crate
   9: <rustc_metadata::locator::CrateLocator>::maybe_load_library_crate
  10: <rustc_metadata::creader::CrateLoader>::load
  11: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  12: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  13: <rustc_metadata::creader::CrateLoader>::resolve_crate
  14: <rustc_metadata::creader::CrateLoader>::process_extern_crate
  15: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
  16: rustc_ast::visit::walk_crate::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
  17: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_crate
  18: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
  19: <rustc_expand::expand::MacroExpander>::collect_invocations
  20: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  21: <rustc_expand::expand::MacroExpander>::expand_crate
  22: <rustc_session::session::Session>::time::<core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>, rustc_interface::passes::configure_and_expand::{closure#1}>
  23: rustc_interface::passes::configure_and_expand
  24: <rustc_interface::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface::queries::Queries>::expansion::{closure#0}::{closure#0}, core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>>
  25: <rustc_interface::queries::Query<(alloc::rc::Rc<rustc_ast::ast::Crate>, alloc::rc::Rc<core::cell::RefCell<rustc_interface::passes::boxed_resolver::BoxedResolver>>, alloc::rc::Rc<rustc_lint::context::LintStore>)>>::compute::<<rustc_interface::queries::Queries>::expansion::{closure#0}>
  26: <rustc_interface::queries::Queries>::expansion
  27: <rustc_interface::queries::Query<rustc_interface::passes::QueryContext>>::compute::<<rustc_interface::queries::Queries>::global_ctxt::{closure#0}>
  28: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  29: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  30: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.69.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C split-debuginfo=off -C llvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -Z tls-model=initial-exec

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

query stack during panic:
end of query stack
error: could not compile `url`
Build completed unsuccessfully in 0:08:11

Im currently working on fixing #107231 if that's relevant. Still this error occurs my new code is commented.

@blyxyas
Copy link
Member Author

blyxyas commented Jan 29, 2023

@rustbot label: +T-compiler, +I-ICE

@rustbot rustbot added 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 Jan 29, 2023
@jyn514
Copy link
Member

jyn514 commented Feb 2, 2023

This happens when building stage 1 cargo, so it's likely a duplicate of #76720

@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

3 participants