generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
diffblue/cbmc
#8554Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issueT-UserTag user issues / requestsTag user issues / requests[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.Issues that cause Kani verification to fail despite the code being correct.
Description
I tried this code:
#[kani::requires(true)]
fn foo() {
for _ in 0..2 {
for _ in 0..2 {}
}
}
#[kani::proof_for_contract(foo)]
#[kani::unwind(3)]
fn check_foo_contract() {
foo()
}using the following command line invocation:
cargo kani -Z function-contracts
with Kani version: cargo-kani 0.57.0
I expected to see this happen:
VERIFICATION:- SUCCESSFUL
Instead, this happened:
SUMMARY:
** 1 of 55 failed
Failed Checks: Check that self->start is assignable
File: "/home/runner/.rustup/toolchains/nightly-2024-12-15-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs", line 767, in <std::ops::Range<i32> as std::iter::range::RangeIteratorImpl>::spec_next
VERIFICATION:- FAILED
Note: Verification using kani::proof works as expected.
#[kani::proof]
#[kani::unwind(3)]
fn check_foo() {
foo()
}Metadata
Metadata
Assignees
Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issueT-UserTag user issues / requestsTag user issues / requests[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.Issues that cause Kani verification to fail despite the code being correct.