Skip to content

Commit af70d99

Browse files
authored
Arrays with more than 64 elements no longer cause spurious failures (model-checking#4470)
With model-checking#4448 merged (upgrade to CBMC 6.8.0) we have the necessary fix in place to avoid spurious failures with arrays that have more than 64 elements. Resolves: model-checking#2416 Resolves: model-checking#4408 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent e135972 commit af70d99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/kani/Array/array_64.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright Kani Contributors
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
//! Check that CBMC (as invoked via Kani) does not spuriously fail with arrays of more 64 elements.
4+
5+
#[derive(PartialEq, Eq)]
6+
enum Foo {
7+
A,
8+
B([u8; 65]),
9+
}
10+
11+
#[kani::proof]
12+
fn main() {
13+
let x: Foo = Foo::B([42; 65]);
14+
let y: Foo = Foo::B([42; 65]);
15+
assert!(x == y);
16+
}

0 commit comments

Comments
 (0)