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: attempt to shift left with overflow, compiler/rustc_serialize/src/leb128.rs:76:1 #89279

Closed
jyn514 opened this issue Sep 26, 2021 · 2 comments
Labels
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Sep 26, 2021

Code

Uhh hard to replicate, I was rebasing bdb5a5ffe17 over ac8dd1b.

Meta

rustc --version --verbose:

rustc 1.57.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.57.0-dev
LLVM version: 13.0.0

Error output

Building stage1 tool clippy-driver (x86_64-unknown-linux-gnu)
thread 'rustc' panicked at 'attempt to shift left with overflow', /home/joshua/rustc3/compiler/rustc_serialize/src/leb128.rs:76:1
error: could not compile `rustc_tools_util`
thread 'main' panicked at 'in-tree tool', src/bootstrap/test.rs:658:14
Backtrace

thread 'rustc' panicked at 'attempt to shift left with overflow', /home/joshua/rustc3/compiler/rustc_serialize/src/leb128.rs:76:1
stack backtrace:
   0: rust_begin_unwind
             at ./library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at ./library/core/src/panicking.rs:100:14
   2: core::panicking::panic
             at ./library/core/src/panicking.rs:50:5
   3: rustc_serialize::leb128::read_u32_leb128
   4: <rustc_serialize::opaque::Decoder as rustc_serialize::serialize::Decoder>::read_u32
             at ./compiler/rustc_serialize/src/opaque.rs:580:9
   5: <u32 as rustc_serialize::serialize::Decodable<D>>::decode
             at ./compiler/rustc_serialize/src/serialize.rs:343:21
   6: rustc_serialize::collection_impls::<impl rustc_serialize::serialize::Decodable<D> for std::collections::hash::map::HashMap<K,V,S>>::decode::{{closure}}::{{closure}}
             at ./compiler/rustc_serialize/src/collection_impls.rs:170:50
   7: rustc_serialize::serialize::Decoder::read_map_elt_val
             at ./compiler/rustc_serialize/src/serialize.rs:295:9
   8: rustc_serialize::collection_impls::<impl rustc_serialize::serialize::Decodable<D> for std::collections::hash::map::HashMap<K,V,S>>::decode::{{closure}}
             at ./compiler/rustc_serialize/src/collection_impls.rs:170:27
   9: rustc_serialize::serialize::Decoder::read_map
             at ./compiler/rustc_serialize/src/serialize.rs:279:9
  10: rustc_serialize::collection_impls::<impl rustc_serialize::serialize::Decodable<D> for std::collections::hash::map::HashMap<K,V,S>>::decode
             at ./compiler/rustc_serialize/src/collection_impls.rs:165:9
  11: core::ops::function::FnOnce::call_once
             at ./library/core/src/ops/function.rs:227:5
  12: rustc_serialize::serialize::Decoder::read_struct_field
             at ./compiler/rustc_serialize/src/serialize.rs:225:9
  13: rustc_query_impl::on_disk_cache::_DERIVE_rustc_serialize_Decodable_D_FOR_Footer::<impl rustc_serialize::serialize::Decodable<__D> for rustc_query_impl::on_disk_cache::Footer>::decode::{{closure}}
             at ./compiler/rustc_query_impl/src/on_disk_cache.rs:95:21
  14: rustc_serialize::serialize::Decoder::read_struct
             at ./compiler/rustc_serialize/src/serialize.rs:217:9
  15: rustc_query_impl::on_disk_cache::_DERIVE_rustc_serialize_Decodable_D_FOR_Footer::<impl rustc_serialize::serialize::Decodable<__D> for rustc_query_impl::on_disk_cache::Footer>::decode
             at ./compiler/rustc_query_impl/src/on_disk_cache.rs:95:21
  16: rustc_query_impl::on_disk_cache::decode_tagged
             at ./compiler/rustc_query_impl/src/on_disk_cache.rs:551:17
  17: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::new
             at ./compiler/rustc_query_impl/src/on_disk_cache.rs:173:13
  18: rustc_incremental::persist::load::load_query_result_cache
             at ./compiler/rustc_incremental/src/persist/load.rs:214:61
  19: rustc_interface::passes::create_global_ctxt
             at ./compiler/rustc_interface/src/passes.rs:805:38
  20: rustc_interface::queries::Queries::global_ctxt::{{closure}}
             at ./compiler/rustc_interface/src/queries.rs:226:16
  21: rustc_interface::queries::Query<T>::compute
             at ./compiler/rustc_interface/src/queries.rs:38:28
  22: rustc_driver::run_compiler::{{closure}}::{{closure}}
             at ./compiler/rustc_driver/src/lib.rs:377:13
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
             at ./compiler/rustc_interface/src/queries.rs:390:19
  24: rustc_driver::run_compiler::{{closure}}
             at ./compiler/rustc_driver/src/lib.rs:312:22
  25: rustc_interface::interface::create_compiler_and_run::{{closure}}
             at ./compiler/rustc_interface/src/interface.rs:209:13
  26: rustc_span::with_source_map
             at ./compiler/rustc_span/src/lib.rs:976:5
  27: rustc_interface::interface::create_compiler_and_run
             at ./compiler/rustc_interface/src/interface.rs:203:5
  28: rustc_interface::interface::run_compiler::{{closure}}
             at ./compiler/rustc_interface/src/interface.rs:225:12
  29: rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals::{{closure}}::{{closure}}
             at ./compiler/rustc_interface/src/util.rs:145:13
  30: scoped_tls::ScopedKey<T>::set
             at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137:9
  31: rustc_span::create_session_globals_then
             at ./compiler/rustc_span/src/lib.rs:109:5
  32: rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals::{{closure}}
             at ./compiler/rustc_interface/src/util.rs:143:9
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.57.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z tls-model=initial-exec -Z binary-dep-depinfo -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 -C debug-assertions=on -C incremental -C link-args=-Wl,-rpath,$ORIGIN/../lib -C llvm-args=-import-instr-limit=10 --crate-type lib

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

query stack during panic:
end of query stack

@jyn514 jyn514 added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-metadata Area: Crate metadata T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Sep 26, 2021
@jyn514
Copy link
Member Author

jyn514 commented Sep 26, 2021

Hmm, this may be a duplicate of #76720.

@jyn514
Copy link
Member Author

jyn514 commented Sep 26, 2021

Running rm -r build/x86_64-unknown-linux-gnu/stage1-tools fixed this issue so I think this is indeed an issue with using -dev instead of the git hash.

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. 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

1 participant