-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into nondet-meminit
- Loading branch information
Showing
5 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
// kani-flags: -Z ghost-state -Z uninit-checks | ||
|
||
/// Checks that Kani rejects mutable pointer casts between types of different padding. | ||
#[kani::proof] | ||
fn invalid_value() { | ||
unsafe { | ||
let mut value: u128 = 0; | ||
let ptr = &mut value as *mut _ as *mut (u8, u32, u64); | ||
*ptr = (4, 4, 4); // This assignment itself does not cause UB... | ||
let c: u128 = value; // ...but this reads a padding value! | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Failed Checks: Kani does not support reasoning about memory initialization in presence of mutable raw pointer casts that could cause delayed UB. | ||
|
||
VERIFICATION:- FAILED | ||
|
||
Complete - 0 successfully verified harnesses, 1 failures, 1 total. |
Submodule s2n-quic
updated
6 files