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

Compiler Error: 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 2' #99330

Closed
BlackDex opened this issue Jul 16, 2022 · 1 comment · Fixed by #99263
Closed
Labels
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

@BlackDex
Copy link

Running clippy or build on the Vaultwarden code-base using nightly breaks.
It is broken since nightly-2022-07-15 and still works on nightly-2022-07-14

Tried to run cargo clean before running this without luck.

If you need any more information, please let me know.

Code

Vaultwarden: https://github.com/dani-garcia/vaultwarden

Meta

Working:

$ cargo +nightly-2022-07-14 clippy -V
clippy 0.1.64 (87588a2 2022-07-13)
---
$ cargo +nightly-2022-07-14 -vV
cargo 1.64.0-nightly (b1dd22e66 2022-07-09)
release: 1.64.0-nightly
commit-hash: b1dd22e668af5279e13a071ad4b17435bd6bfa4c
commit-date: 2022-07-09
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Ubuntu 20.04 (focal) [64-bit]

Broken since:

$ cargo +nightly-2022-07-15 clippy -V
clippy 0.1.64 (c2f428d 2022-07-14)
---
$ cargo +nightly-2022-07-15 -vV
cargo 1.64.0-nightly (8827baaa7 2022-07-14)
release: 1.64.0-nightly
commit-hash: 8827baaa781b37872134c1ba692a6f0aeb37890e
commit-date: 2022-07-14
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Ubuntu 20.04 (focal) [64-bit]

# And also broken on
$ cargo +nightly-2022-07-16 clippy -V
clippy 0.1.64 (23e21bd 2022-07-15)
---
$ cargo +nightly-2022-07-16 -vV
cargo 1.64.0-nightly (8827baaa7 2022-07-14)
release: 1.64.0-nightly
commit-hash: 8827baaa781b37872134c1ba692a6f0aeb37890e
commit-date: 2022-07-14
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Ubuntu 20.04 (focal) [64-bit]

Error output

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 2', compiler/rustc_builtin_macros/src/format.rs:1001:28
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.64.0-nightly (23e21bdd2 2022-07-15) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2

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

query stack during panic:
end of query stack
error: could not compile `time`
warning: build failed, waiting for other jobs to finish...
Backtrace

stack backtrace:
   0:     0x74cf44aa2930 - std::backtrace_rs::backtrace::libunwind::trace::hc933fa0cb8627706
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x74cf44aa2930 - std::backtrace_rs::backtrace::trace_unsynchronized::h821571732dd332a1
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x74cf44aa2930 - std::sys_common::backtrace::_print_fmt::h557d50ac4a63aebc
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x74cf44aa2930 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h76b8147c2bdde75b
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x74cf44afbf0c - core::fmt::write::h5d8be78170c85a1a
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/fmt/mod.rs:1198:17
   5:     0x74cf44a93f35 - std::io::Write::write_fmt::h506eb24e7560f644
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/io/mod.rs:1672:15
   6:     0x74cf44aa55c1 - std::sys_common::backtrace::_print::h2201ccbfedce10bc
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x74cf44aa55c1 - std::sys_common::backtrace::print::hfac17af9266b406b
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x74cf44aa55c1 - std::panicking::default_hook::{{closure}}::h391a6c901adb4324
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:295:22
   9:     0x74cf44aa5293 - std::panicking::default_hook::hba36336a5210bb57
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:314:9
   Compiling futures-channel v0.3.21
  10:     0x74cf4534ac11 - rustc_driver[ce628f6b2a67333f]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x74cf44aa5d96 - std::panicking::rust_panic_with_hook::hf5a9c547fa70e52e
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:702:17
  12:     0x74cf44aa5be7 - std::panicking::begin_panic_handler::{{closure}}::h458eb96a30055863
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:588:13
  13:     0x74cf44aa2e14 - std::sys_common::backtrace::__rust_end_short_backtrace::he0b6e245c28401ce
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x74cf44aa5912 - rust_begin_unwind
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/panicking.rs:584:5
  15:     0x74cf44a69c53 - core::panicking::panic_fmt::h9776dcd13d59b560
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:142:14
  16:     0x74cf44a69b92 - core::panicking::panic_bounds_check::hc49ce542f03c88ff
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/core/src/panicking.rs:84:5
  17:     0x74cf4776aeb8 - rustc_builtin_macros[555fb7b74bb18701]::format::expand_preparsed_format_args
  18:     0x74cf477645fc - rustc_builtin_macros[555fb7b74bb18701]::format::expand_format_args_impl
  19:     0x74cf470a525d - <rustc_expand[315316ef4f9feff3]::expand::MacroExpander>::fully_expand_fragment
  20:     0x74cf47c06f8b - <rustc_expand[315316ef4f9feff3]::expand::MacroExpander>::expand_crate
  21:     0x74cf4753fdd2 - <rustc_session[a00dc85a9977996c]::session::Session>::time::<core[675039967b0ce395]::result::Result<rustc_ast[5a87b50f347d23c0]::ast::Crate, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_interface[7690044e2c4491ef]::passes::configure_and_expand::{closure#1}>
  22:     0x74cf47532bd7 - <rustc_interface[7690044e2c4491ef]::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface[7690044e2c4491ef]::queries::Queries>::expansion::{closure#0}::{closure#0}, core[675039967b0ce395]::result::Result<rustc_ast[5a87b50f347d23c0]::ast::Crate, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  23:     0x74cf4752b3e2 - <rustc_interface[7690044e2c4491ef]::queries::Queries>::expansion
  24:     0x74cf474f475c - <rustc_interface[7690044e2c4491ef]::interface::Compiler>::enter::<rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}::{closure#2}, core[675039967b0ce395]::result::Result<core[675039967b0ce395]::option::Option<rustc_interface[7690044e2c4491ef]::queries::Linker>, rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  25:     0x74cf474f09bf - rustc_span[715bcd6866f3f365]::with_source_map::<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_interface[7690044e2c4491ef]::interface::create_compiler_and_run<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#1}>
  26:     0x74cf4750cc40 - rustc_interface[7690044e2c4491ef]::interface::create_compiler_and_run::<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>
  27:     0x74cf47520d72 - <scoped_tls[e6e812a5eee10b50]::ScopedKey<rustc_span[715bcd6866f3f365]::SessionGlobals>>::set::<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  28:     0x74cf474f2f2f - std[ed8ee9cb5bbd555]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7690044e2c4491ef]::util::run_in_thread_pool_with_globals<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>
  29:     0x74cf4750d099 - <<std[ed8ee9cb5bbd555]::thread::Builder>::spawn_unchecked_<rustc_interface[7690044e2c4491ef]::util::run_in_thread_pool_with_globals<rustc_interface[7690044e2c4491ef]::interface::run_compiler<core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>, rustc_driver[ce628f6b2a67333f]::run_compiler::{closure#1}>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#0}, core[675039967b0ce395]::result::Result<(), rustc_errors[d21ca108a24cfd08]::ErrorGuaranteed>>::{closure#1} as core[675039967b0ce395]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x74cf44aaf7e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb12c75146d360fc4
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/alloc/src/boxed.rs:1934:9
  31:     0x74cf44aaf7e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he05a53703329061d
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/alloc/src/boxed.rs:1934:9
  32:     0x74cf44aaf7e3 - std::sys::unix::thread::Thread::new::thread_start::h45088dc5029897c3
                               at /rustc/23e21bdd25026e2839ebe946c2a937c1904887d2/library/std/src/sys/unix/thread.rs:108:17
  33:     0x74cf48ff4609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  34:     0x74cf4492d133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  35:                0x0 - <unknown>

@BlackDex BlackDex 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 Jul 16, 2022
@BlackDex
Copy link
Author

BlackDex commented Jul 16, 2022

Looks like this is a duplicate of #99261, #99271, #99273, #99289, #99297, #99326 and #99327

Sorry for the clutter ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

Successfully merging a pull request may close this issue.

1 participant