Skip to content

Recursion limit reached compile error on chrono crate #1949

@zhassan-aws

Description

@zhassan-aws

Steps to reproduce:

  1. cargo new chrono_dep
  2. cd chrono_dep
  3. cargo add chrono@=0.4.19

using the following command line invocation:

cargo kani

with Kani version: 6869324

I expected to see this happen: No proof harnesses (functions with #[kani::proof]) were found to verify.

Instead, this happened:

$ cargo kani
   Compiling autocfg v1.1.0
   Compiling libc v0.2.137
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling time v0.1.45
   Compiling chrono v0.4.19
error: recursion limit reached while expanding `stringify!`
  --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.19/src/sys/unix.rs:85:13
   |
85 |             panic!("localtime_r failed: {}", io::Error::last_os_error());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`chrono`)
   = note: this error originates in the macro `core::assert` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

Error: "Failed to compile crate."
error: could not compile `chrono` due to previous error
Error: cargo exited with status exit status: 101

Metadata

Metadata

Assignees

Labels

T-High PriorityTag issues that have high priority[C] BugThis is a bug. Something isn't working.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions