-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Status: SUCCESS\ | ||
Description: "offset: attempt to compute number in bytes which would overflow" | ||
|
||
Status: SUCCESS\ | ||
Description: "attempt to compute offset which would overflow" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: pointer NULL" | ||
|
||
Status: SUCCESS | ||
Description: "dereference failure: pointer invalid" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: deallocated dynamic object" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: dead object" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: pointer outside object bounds" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: invalid integer address" | ||
|
||
Status: FAILURE\ | ||
Description: "dereference failure: invalid integer address" |
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,19 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
const BUFFER: *mut u32 = 0x8000 as *mut u32; | ||
const BUFFER2: *mut u32 = 0x1000 as *mut u32; | ||
|
||
#[cfg(kani)] | ||
#[kani::proof] | ||
#[kani::mmio_region(0x8000, 8)] | ||
fn test_write() { | ||
let val = 12; | ||
unsafe { | ||
//BUFFER+2 is not in the MMIO region | ||
*(BUFFER.offset(2)) = val; | ||
//BUFFER2 is not in the MMIO region | ||
*BUFFER2 = val; | ||
|
||
} | ||
} |
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