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

Index out of bounds on x86_64-apple-darwin nightly with time 0.3.11. #99366

Closed
XAMPPRocky opened this issue Jul 17, 2022 · 2 comments
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

@XAMPPRocky
Copy link
Member

XAMPPRocky commented Jul 17, 2022

The following ICE appeared in rasn’s CI in main. Worth noting that this originally passed in the PR, so the bug was probably introduced after rustc 1.64.0-nightly (1517f5de0 2022-07-07), and is not present in stable or beta.

Meta

rustc --version --verbose:

1.64.0-nightly (c2f428d2f 2022-07-14)

Error output

2022-07-15T19:14:06.1021330Z    Compiling time v0.3.11
2022-07-15T19:14:06.4728690Z 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
2022-07-15T19:14:06.4742260Z stack backtrace:
2022-07-15T19:14:06.4860140Z    0:        0x100d74d44 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3bae93de7e909f98
2022-07-15T19:14:06.4943760Z    1:        0x100dcc6eb - core::fmt::write::h015f2abcd0dede7a
2022-07-15T19:14:06.4966590Z    2:        0x100d6742c - std::io::Write::write_fmt::h5e6d8959eec55de1
2022-07-15T19:14:06.5075450Z    3:        0x100d77e17 - std::panicking::default_hook::{{closure}}::hc5dcf5136d15fddd
2022-07-15T19:14:06.5209220Z    4:        0x100d77b20 - std::panicking::default_hook::h1f1fc9fdfa1a3230
2022-07-15T19:14:06.5279590Z    5:        0x105409c8a - rustc_driver[f0976747e5506787]::DEFAULT_HOOK::{closure#0}::{closure#0}
2022-07-15T19:14:06.5281360Z    6:        0x100d7854d - std::panicking::rust_panic_with_hook::hda5f1265d6864b2c
2022-07-15T19:14:06.5282670Z    7:        0x100d783f3 - std::panicking::begin_panic_handler::{{closure}}::h90ea6d5574f51a59
2022-07-15T19:14:06.5283950Z    8:        0x100d751f7 - std::sys_common::backtrace::__rust_end_short_backtrace::h830f0220810754ef
2022-07-15T19:14:06.5285990Z    9:        0x100d780cd - _rust_begin_unwind
2022-07-15T19:14:06.5287210Z   10:        0x100df7a43 - core::panicking::panic_fmt::h336e96b5824e16ac
2022-07-15T19:14:06.5288820Z   11:        0x100df7996 - core::panicking::panic_bounds_check::hced588eee9413f98
2022-07-15T19:14:06.5346590Z   12:        0x107e99c92 - rustc_builtin_macros[a24cf6c6e70cdd8a]::format::expand_preparsed_format_args
2022-07-15T19:14:06.5348410Z   13:        0x107e9240b - rustc_builtin_macros[a24cf6c6e70cdd8a]::format::expand_format_args_impl
2022-07-15T19:14:06.5349670Z   14:        0x1093a3854 - <rustc_expand[613880ea7a1f4723]::expand::MacroExpander>::fully_expand_fragment
2022-07-15T19:14:06.5351170Z   15:        0x1093a2b6f - <rustc_expand[613880ea7a1f4723]::expand::MacroExpander>::expand_crate
2022-07-15T19:14:06.5353970Z   16:        0x1054d5ba6 - <rustc_session[d099487e84ea56d0]::session::Session>::time::<core[cf3dbd3869dbba44]::result::Result<rustc_ast[e095b679a2a1e48a]::ast::Crate, rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_interface[c2f526d835f70adb]::passes::configure_and_expand::{closure#1}>
2022-07-15T19:14:06.5356250Z   17:        0x1054a0418 - rustc_interface[c2f526d835f70adb]::passes::configure_and_expand
2022-07-15T19:14:06.5358030Z   18:        0x1054c48e3 - <rustc_interface[c2f526d835f70adb]::queries::Queries>::expansion
2022-07-15T19:14:06.5359950Z   19:        0x105383397 - <rustc_interface[c2f526d835f70adb]::interface::Compiler>::enter::<rustc_driver[f0976747e5506787]::run_compiler::{closure#1}::{closure#2}, core[cf3dbd3869dbba44]::result::Result<core[cf3dbd3869dbba44]::option::Option<rustc_interface[c2f526d835f70adb]::queries::Linker>, rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>
2022-07-15T19:14:06.5361500Z   20:        0x1053794b8 - rustc_span[36896e0cb6bb9b17]::with_source_map::<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_interface[c2f526d835f70adb]::interface::create_compiler_and_run<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_driver[f0976747e5506787]::run_compiler::{closure#1}>::{closure#1}>
2022-07-15T19:14:06.5363300Z   21:        0x105384fe6 - rustc_interface[c2f526d835f70adb]::interface::create_compiler_and_run::<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_driver[f0976747e5506787]::run_compiler::{closure#1}>
2022-07-15T19:14:06.5375000Z   22:        0x1053762e5 - <scoped_tls[98e5b78f537dbb63]::ScopedKey<rustc_span[36896e0cb6bb9b17]::SessionGlobals>>::set::<rustc_interface[c2f526d835f70adb]::interface::run_compiler<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_driver[f0976747e5506787]::run_compiler::{closure#1}>::{closure#0}, core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>
2022-07-15T19:14:06.5378260Z   23:        0x105380129 - std[ecc071ea8f6d755]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c2f526d835f70adb]::util::run_in_thread_pool_with_globals<rustc_interface[c2f526d835f70adb]::interface::run_compiler<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_driver[f0976747e5506787]::run_compiler::{closure#1}>::{closure#0}, core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>::{closure#0}, core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>
2022-07-15T19:14:06.5381020Z   24:        0x1053ba131 - <<std[ecc071ea8f6d755]::thread::Builder>::spawn_unchecked_<rustc_interface[c2f526d835f70adb]::util::run_in_thread_pool_with_globals<rustc_interface[c2f526d835f70adb]::interface::run_compiler<core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>, rustc_driver[f0976747e5506787]::run_compiler::{closure#1}>::{closure#0}, core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>::{closure#0}, core[cf3dbd3869dbba44]::result::Result<(), rustc_errors[40b0eadd63e7af36]::ErrorGuaranteed>>::{closure#1} as core[cf3dbd3869dbba44]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
2022-07-15T19:14:06.5382270Z   25:        0x100d81227 - std::sys::unix::thread::Thread::new::thread_start::h4c28c1eab237bd6e
2022-07-15T19:14:06.5586710Z   26:     0x7fff206718fc - __pthread_start
2022-07-15T19:14:06.5626600Z 
2022-07-15T19:14:06.5627610Z error: internal compiler error: unexpected panic
2022-07-15T19:14:06.5628170Z 
2022-07-15T19:14:06.5628680Z note: the compiler unexpectedly panicked. this is a bug.
2022-07-15T19:14:06.5629210Z 
2022-07-15T19:14:06.5630190Z 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
2022-07-15T19:14:06.5630840Z 
2022-07-15T19:14:06.5631790Z note: rustc 1.64.0-nightly (c2f428d2f 2022-07-14) running on x86_64-apple-darwin
2022-07-15T19:14:06.5632500Z 
2022-07-15T19:14:06.5633170Z note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2
2022-07-15T19:14:06.5634380Z 
2022-07-15T19:14:06.5634880Z note: some of the compiler flags provided by cargo are hidden
2022-07-15T19:14:06.5635400Z 
2022-07-15T19:14:06.5635820Z query stack during panic:
2022-07-15T19:14:06.5636430Z end of query stack
2022-07-15T19:14:06.5747510Z error: could not compile `time`
@XAMPPRocky XAMPPRocky 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 17, 2022
@matthiaskrgr
Copy link
Member

This is #99261 I think the latest nightly should already provide a fix?

@ehuss
Copy link
Contributor

ehuss commented Jul 17, 2022

Thanks for the report! Closing as a duplicate of #99261. This should be fixed by #99263 and should be fixed in the latest nightly.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2022
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

No branches or pull requests

3 participants