Skip to content

Internal compiler error when compiling time #99297

@cgranade

Description

@cgranade

When using cargo install cargo2junit, an internal compiler error was encountered in the time crate brought in as a dependency. I was not able to immediately find a minimum example that reproduces the problem; will work on doing so and will update this issue accordingly if I find a minimal example.

Code

$ cargo install cargo2junit

Meta

rustc --version --verbose:

rustc 1.64.0-nightly (c2f428d2f 2022-07-14)
binary: rustc
commit-hash: c2f428d2f3340a0e7d995f4726223db91b93704c
commit-date: 2022-07-14
host: x86_64-pc-windows-msvc
release: 1.64.0-nightly
LLVM version: 14.0.6

NB: The issue does not occur in stable, nor in the July 7th build of +nightly.

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
Backtrace

stack backtrace:
   0:     0x7ffb90039d2f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h22584ecc91186e64
   1:     0x7ffb9007547a - core::fmt::write::h22be7db69745eece
   2:     0x7ffb9002cbaa - <std::io::IoSlice as core::fmt::Debug>::fmt::h61da6bb58c94015d
   3:     0x7ffb9003d72b - std::panicking::default_hook::heafef5cea9c12d8b
   4:     0x7ffb9003d357 - std::panicking::default_hook::heafef5cea9c12d8b
   5:     0x7ffaca1db4a4 - <rustc_session[535a8d342c23eaa3]::options::WasiExecModel as rustc_session[535a8d342c23eaa3]::config::dep_tracking::DepTrackingHash>::hash
   6:     0x7ffb9003e10c - std::panicking::rust_panic_with_hook::h79169c76d34f987b
   7:     0x7ffb9003de8d - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::hfcbc70f6a02eb89b
   8:     0x7ffb9003aa27 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h22584ecc91186e64
   9:     0x7ffb9003db60 - rust_begin_unwind
  10:     0x7ffb900ab445 - core::panicking::panic_fmt::hae5fa724e8b1cacf
  11:     0x7ffb900ab367 - core::panicking::panic_bounds_check::h08b683e936011160
  12:     0x7ffac8344b34 - <rustc_builtin_macros[a4414a5fcae6fbbd]::source_util::expand_include::ExpandResult as rustc_expand[f9fe2c5fbee49e01]::base::MacResult>::make_items
  13:     0x7ffac833d297 - <rustc_builtin_macros[a4414a5fcae6fbbd]::source_util::expand_include::ExpandResult as rustc_expand[f9fe2c5fbee49e01]::base::MacResult>::make_items
  14:     0x7ffac9d15032 - <rustc_expand[f9fe2c5fbee49e01]::expand::MacroExpander>::fully_expand_fragment
  15:     0x7ffac88380c7 - <rustc_expand[f9fe2c5fbee49e01]::expand::MacroExpander>::expand_crate
  16:     0x7ffac7bc6ee5 - rustc_interface[d38a371e72ccadf5]::util::commit_date_str
  17:     0x7ffac7bbcec7 - <rustc_interface[d38a371e72ccadf5]::passes::LintStoreExpandImpl as rustc_expand[f9fe2c5fbee49e01]::base::LintStoreExpand>::pre_expansion_lint
  18:     0x7ffac7bb146b - <rustc_interface[d38a371e72ccadf5]::queries::Queries>::expansion
  19:     0x7ffac7b85944 - <unknown>
  20:     0x7ffac7b9e107 - rustc_driver[39d376d6076eb2]::args::arg_expand_all
  21:     0x7ffac7b87469 - <unknown>
  22:     0x7ffac7b883ed - <rustc_middle[f080ea4a7cc158b5]::ty::SymbolName as core[1f2b1784ea6e9a42]::fmt::Display>::fmt
  23:     0x7ffb9004f02c - std::sys::windows::thread::Thread::new::hdddbeea900b2c6ad
  24:     0x7ffc13cd54e0 - BaseThreadInitThunk
  25:     0x7ffc14d2485b - RtlUserThreadStart

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Jul 15, 2022
cgranade

cgranade commented on Jul 15, 2022

@cgranade
Author

Apologies, it looks like this may be a duplicate of #99261.

added a commit that references this issue on Jul 16, 2022
5635158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @cgranade

      Issue actions

        Internal compiler error when compiling `time` · Issue #99297 · rust-lang/rust