Skip to content

-Z uninit-checks: the integer_min, integer_max and cold_path intrinsics are reported as unsupported #5164

Open

Description

@feliperodri

With -Z uninit-checks, any harness that reaches these intrinsics fails with

Kani does not support reasoning about memory initialization of intrinsic `Unimplemented { name: "integer_min", issue_link: "..." }`.

None of them touches memory: integer_min/integer_max return one of their two integer arguments (they back Ord::min/max for integers in current core), and cold_path is a hint with no arguments. So there's nothing to check, and they can go in the list of intrinsics that need no instrumentation.

They are common in std: in verify-rust-std's VecDeque harnesses (#681), 26 failures across resize_with, append, shrink_to, wrap_copy and others come from these three (integer_min 20, integer_max 4, cold_path 2), so every harness that calls cmp::min on a length fails.

Reproducer:

#[kani::proof]
fn min_max() {
    let a: usize = kani::any();
    let b: usize = kani::any();
    assert!(core::cmp::min(a, b) <= core::cmp::max(a, b));
}

kani -Z uninit-checks min.rs at c5e65fd fails with the "does not support reasoning about memory initialization of intrinsic" check for both integer_min and integer_max; without the flag it verifies.

Related: #3300.

Activity

  1. added
    [F] Spurious Failure
    Z-Kani Compiler
    on Nov 17, 2026
  2. added theissue type on Nov 17, 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 Compiler[F] Spurious Failure

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions