Skip to content

_tlv_atexit definition is missing #2430

Open

Description

@adpaco

I tried this code:

#[kani::proof]
fn random_cannot_be_zero() {
    assert_ne!(rand::random::<u32>(), 0);
}

using the following command line invocation:

cargo kani

with Kani version: 0.27.0

I expected to see this happen: Verification fails because of failed assertion.

Instead, this happened: Verification fails because function _tlv_atexit isn't defined but reachable.

SUMMARY:
 ** 1 of 6230 failed (6229 undetermined)
Failed Checks: Function `_tlv_atexit` with missing definition is unreachable

VERIFICATION:- FAILED
Verification Time: 2.8755684s

Notes: This issue comes from #1781 , where I noted that this failure occurs in macOS (instead of the issue discussed there).
According to @celinval:

Hi @adpaco-aws, I think that is a different issue. The issue you are describing is that an extern function that hasn't been defined is being invoked. For that to work, we would either need to provide a stub for this function or compile the C code where this function is defined (like here).

Activity

  1. added
    [C] BugThis is a bug. Something isn't working.
    on May 4, 2023
  2. added this to the C-FFI Milestone milestone on May 4, 2023
  3. added theissue type on Apr 1, 2026
  4. added
    [F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.
    Z-Kani CompilerIssues that require some changes to the compiler
    on Nov 5, 2026
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

    Z-Kani CompilerIssues that require some changes to the compiler[C] BugThis is a bug. Something isn't working.[E] Unsupported ConstructAdd support to an unsupported construct[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions