Skip to content

"index 18446744073709551615 out of range for slice of length 0" at src/librustc_save_analysis/dump_visitor.rs:213:21 #73041

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
staktrace opened this issue Jun 5, 2020 · 2 comments · Fixed by #73046
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@staktrace
Copy link
Contributor

staktrace commented Jun 5, 2020

Code

rustup update nightly
git clone https://github.com/mozilla/glean
cd glean
RUSTFLAGS="-Z save-analysis" cargo +nightly check --all

Meta

rustc --version --verbose:

rustc 1.45.0-nightly (47c3158c3 2020-06-04)
binary: rustc
commit-hash: 47c3158c3d797f75f0f7b2b2a977179668919dab
commit-date: 2020-06-04
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 10.0

Error output

thread 'rustc' panicked at 'index 18446744073709551615 out of range for slice of length 0', src/librustc_save_analysis/dump_visitor.rs:213:21
Backtrace

stack backtrace:
   0:     0x7fa6814e68e5 - backtrace::backtrace::libunwind::trace::hdbb9dcedd5b14342
                               at /cargo/registry/src/github.heygears.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:     0x7fa6814e68e5 - backtrace::backtrace::trace_unsynchronized::h5cb0c657a8aaefe5
                               at /cargo/registry/src/github.heygears.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:     0x7fa6814e68e5 - std::sys_common::backtrace::_print_fmt::hf3d2b27f4a1fea46
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x7fa6814e68e5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hffe95416249239d3
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x7fa681523e9c - core::fmt::write::hdf236390fbd68d3d
                               at src/libcore/fmt/mod.rs:1076
   5:     0x7fa6814d9093 - std::io::Write::write_fmt::h707372d99b8d3ce8
                               at src/libstd/io/mod.rs:1537
   6:     0x7fa6814eb900 - std::sys_common::backtrace::_print::h97ba20d63ea7ee1f
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x7fa6814eb900 - std::sys_common::backtrace::print::hcec5aeaa0e8a40b0
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x7fa6814eb900 - std::panicking::default_hook::{{closure}}::h8ce2bb1b48eaabb3
                               at src/libstd/panicking.rs:198
   9:     0x7fa6814eb64c - std::panicking::default_hook::hfd893b6e71292289
                               at src/libstd/panicking.rs:218
  10:     0x7fa681bfae13 - rustc_driver::report_ice::h33035c23c2a2abf3
  11:     0x7fa6814ebfac - std::panicking::rust_panic_with_hook::h71be6e32cc7c55db
                               at src/libstd/panicking.rs:490
  12:     0x7fa6814ebb8b - rust_begin_unwind
                               at src/libstd/panicking.rs:388
  13:     0x7fa681520a41 - core::panicking::panic_fmt::hd101a87121fa411f
                               at src/libcore/panicking.rs:101
  14:     0x7fa681525e32 - core::slice::slice_index_len_fail::hb5cd3744b833ae5f
                               at src/libcore/slice/mod.rs:2751
  15:     0x7fa681d0529f - rustc_save_analysis::dump_visitor::DumpVisitor::process_path::he5740622b66129c1
  16:     0x7fa681d0a401 - <rustc_save_analysis::dump_visitor::DumpVisitor as rustc_hir::intravisit::Visitor>::visit_item::h52a7b688fd99e79f
  17:     0x7fa681d06f11 - rustc_save_analysis::dump_visitor::DumpVisitor::process_crate::h98273bd5cb13693f
  18:     0x7fa681bd720a - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::he2f7ad7f79b69458
  19:     0x7fa681c73189 - rustc_session::utils::<impl rustc_session::session::Session>::time::hcef5d2e064d53f9f
  20:     0x7fa681be7c5a - rustc_middle::ty::context::tls::enter_global::h13104a1d9589ac96
  21:     0x7fa681c08f28 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hb67dc99907225910
  22:     0x7fa681c72163 - rustc_span::with_source_map::h03cf73a37b0e569f
  23:     0x7fa681c0b0e8 - rustc_interface::interface::run_compiler_in_existing_thread_pool::h32891cdd002262b1
  24:     0x7fa681be59dd - scoped_tls::ScopedKey<T>::set::hdffe1e0e5fcf8041
  25:     0x7fa681c0bdb6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hbc1b962a56f96b05
  26:     0x7fa681bd918e - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5a64e0a1b67fbf90
  27:     0x7fa6814fb80a - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf1df77fdbbc91b60
                               at /rustc/47c3158c3d797f75f0f7b2b2a977179668919dab/src/liballoc/boxed.rs:1076
  28:     0x7fa6814fb80a - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h0fb79cf50c369e84
                               at /rustc/47c3158c3d797f75f0f7b2b2a977179668919dab/src/liballoc/boxed.rs:1076
  29:     0x7fa6814fb80a - std::sys::unix::thread::Thread::new::thread_start::h5839aae79966bc57
                               at src/libstd/sys/unix/thread.rs:87
  30:     0x7fa6812606db - start_thread
                               at /build/glibc-OTsEL5/glibc-2.27/nptl/pthread_create.c:463
  31:     0x7fa680b7d88f - __clone
  32:                0x0 - <unknown>
error: internal compiler error: unexpected panic

This is a recent regression, since we run this command every day in automation.

@staktrace staktrace added 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. labels Jun 5, 2020
@jonas-schievink jonas-schievink added A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Jun 5, 2020
@staktrace
Copy link
Contributor Author

Almost certainly a regression from #72882

/cc @marmeladema

@matthiaskrgr
Copy link
Member

looks like a duplicate of #73020

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jun 6, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jun 6, 2020
RalfJung added a commit to RalfJung/rust that referenced this issue Jun 6, 2020
RalfJung added a commit to RalfJung/rust that referenced this issue Jun 6, 2020
RalfJung added a commit to RalfJung/rust that referenced this issue Jun 6, 2020
@bors bors closed this as completed in 7355816 Jun 8, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

Successfully merging a pull request may close this issue.

3 participants