generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.
Description
I tried this code:
#[kani::proof]
fn main() {
let mut x = ();
let ptr: *mut () = &mut x as *mut ();
let count: usize = (isize::MAX as usize) + 1;
let res = unsafe { ptr.add(count) };
}using the following command line invocation:
cargo kani
with Kani version: 0.59
I expected to see this happen: verification succeeds because for ZSTs, the offset can overflow isize.
Instead, this happened: Kani failed with this safety check:
kani/library/kani_core/src/models.rs
Line 165 in 006e5da
| kani::safety_check(false, "Offset value overflows isize"); |
Metadata
Metadata
Assignees
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.