generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issue[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:
#[derive(Clone, PartialEq, Eq)]
enum Foo {
A,
B([u8; 65])
}
#[kani::proof]
fn main() {
let x: Foo = Foo::B(kani::any());
let b = x.clone();
assert_eq!(b, x);
}
using the following command line invocation:
kani test.rs
with Kani version:
I expected to see this happen: Verification successful
Instead, this happened: Verification failed:
SUMMARY:
** 1 of 52 failed
Failed Checks: assertion failed: b == x
File: "/home/ubuntu/examples/enum_bug/test.rs", line 11, in main
VERIFICATION:- FAILED
Weird enough, this only happens if the array size is 65 or larger! If I make the array size 64 or less, verification passes!
SUMMARY:
** 0 of 52 failed
VERIFICATION:- SUCCESSFUL
Verification Time: 0.27921867s
Metadata
Metadata
Assignees
Labels
T-CBMCIssue related to an existing CBMC issueIssue related to an existing CBMC issue[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.