Skip to content

Commit

Permalink
Upgrade toolchain to nightly-2025-01-17
Browse files Browse the repository at this point in the history
Changes required due to
- rust-lang/rust#135344: Less unsafe in `dangling`/`without_provenance`

Resolves: model-checking#3840
  • Loading branch information
tautschnig committed Jan 20, 2025
1 parent 6f70c7d commit f49d76b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

[toolchain]
channel = "nightly-2025-01-16"
channel = "nightly-2025-01-17"
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
7 changes: 5 additions & 2 deletions tests/expected/function-contract/valid_ptr.expected
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Checking harness pre_condition::harness_invalid_ptr...
VERIFICATION:- SUCCESSFUL (encountered one or more panics as expected)
Failed Checks: assertion failed: unsafe { read_ptr(ptr) } == -20
Failed Checks: Kani does not support reasoning about pointer to unallocated memory
Failed Checks: dereference failure: pointer outside object bounds
VERIFICATION:- FAILED

Checking harness pre_condition::harness_stack_ptr...
VERIFICATION:- SUCCESSFUL

Checking harness pre_condition::harness_head_ptr...
VERIFICATION:- SUCCESSFUL

Complete - 3 successfully verified harnesses, 0 failures, 3 total
Complete - 2 successfully verified harnesses, 1 failures, 3 total
1 change: 0 additions & 1 deletion tests/expected/function-contract/valid_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ mod pre_condition {
}

#[kani::proof_for_contract(read_ptr)]
#[kani::should_panic]
fn harness_invalid_ptr() {
let ptr = std::ptr::NonNull::<i32>::dangling().as_ptr();
assert_eq!(unsafe { read_ptr(ptr) }, -20);
Expand Down

0 comments on commit f49d76b

Please sign in to comment.