Skip to content

Commit 2d6a6f2

Browse files
committed
Downgrade the toolchain to avoid blocking issue
Mitigates model-checking#1822 which is caused by rust-lang/rust#103814. Ps.: I also bumped cbmc min version since older versions don't work with Kani.
1 parent 3007e84 commit 2d6a6f2

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

rust-toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2022-10-25"
6-
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
5+
channel = "nightly-2022-10-24"
6+
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

scripts/kani-regression.sh

+2-2
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 67
25+
check-cbmc-version.py --major 5 --minor 69
2626
check-cbmc-viewer-version.py --major 3 --minor 5
2727

2828
# Formatting check
@@ -60,7 +60,7 @@ TESTS=(
6060

6161
if [[ "" != "${KANI_ENABLE_UNSOUND_EXPERIMENTS-}" ]]; then
6262
TESTS+=("unsound_experiments kani")
63-
else
63+
else
6464
TESTS+=("no_unsound_experiments expected")
6565
fi
6666

tests/kani/ConstEval/limit.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright Kani Contributors
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
//
4+
// Ensure that constant propagation can deal with a large number.
5+
// This test used to trigger https://github.com/rust-lang/rust/issues/103814
6+
7+
const LENGTH: usize = 131072;
8+
const CONST: usize = {
9+
let data = [1; LENGTH];
10+
let mut idx = 0;
11+
while idx < data.len() {
12+
idx += data[idx];
13+
}
14+
idx
15+
};
16+
17+
#[kani::proof]
18+
fn check_eval() {
19+
assert_eq!(CONST, LENGTH);
20+
}

0 commit comments

Comments
 (0)