Skip to content

Commit cb05915

Browse files
authored
Bump CBMC version (#2067)
1 parent 65b431c commit cb05915

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

kani-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
CBMC_VERSION="5.72.0"
1+
CBMC_VERSION="5.75.0"
22
# If you update this version number, remember to bump it in `src/setup.rs` too
33
CBMC_VIEWER_VERSION="3.8"

scripts/kani-regression.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ KANI_DIR=$SCRIPT_DIR/..
2222
export KANI_FAIL_ON_UNEXPECTED_DESCRIPTION="true"
2323

2424
# Required dependencies
25-
check-cbmc-version.py --major 5 --minor 72
25+
check-cbmc-version.py --major 5 --minor 75
2626
check-cbmc-viewer-version.py --major 3 --minor 5
2727

2828
# Formatting check

tests/cargo-kani/itoa_dep/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright Kani Contributors
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+
[package]
5+
name = "itoa_dep"
6+
version = "0.1.0"
7+
edition = "2021"
8+
9+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
11+
[dependencies]
12+
itoa = "1.0.5"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Status: SUCCESS\
2+
Description: "assertion failed: result == &output"
3+
4+
Status: FAILURE\
5+
Description: "memcpy source region readable"
6+
7+
VERIFICATION:- FAILED

tests/cargo-kani/itoa_dep/src/main.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright Kani Contributors
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+
//! This test checks Kani's support for the `itoa` crate
5+
//! Currently fails with a spurious failure:
6+
//! https://github.com/model-checking/kani/issues/2066
7+
8+
use itoa::{Buffer, Integer};
9+
use std::fmt::Write;
10+
11+
fn check_itoa<T: kani::Arbitrary + Integer + std::fmt::Display>() {
12+
let input: T = kani::any();
13+
let mut buf = Buffer::new();
14+
let result = buf.format(input);
15+
let mut output = String::new();
16+
write!(&mut output, "{}", input);
17+
assert_eq!(result, &output);
18+
}
19+
20+
#[kani::proof]
21+
#[kani::unwind(10)]
22+
fn check_signed() {
23+
check_itoa::<i8>();
24+
}
25+
26+
fn main() {}

0 commit comments

Comments
 (0)