Skip to content

_tlv_atexit definition is missing #2430

@adpaco-aws

Description

@adpaco-aws

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] BugThis is a bug. Something isn't working.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions