generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] SoundnessKani failed to detect an issueKani failed to detect an issue
Description
I assumed ZST addresses are dangling, so they may or may not be equal for different instances of a type.
I tried this code:
#[repr(C)]
#[derive(Copy, Clone)]
struct Z(i8, i64);
struct Y;
#[kani::proof]
fn test_z() -> Z {
let m = Y;
let n = Y;
let zz = Z(1, -1);
let ptr: *const Z = if &n as *const _ == &m as *const _ {
std::ptr::null()
} else {
&zz
};
unsafe{ *ptr }
}using the following command line invocation:
kani main.rs
with Kani version: 0.48.0
I expected to see this happen: An error because addresses to ZSTs are not guaranteed to have distinct addresses at runtime. Running this snippet crashes playground
Instead, this happened:
...
SUMMARY:
** 0 of 7 failed
VERIFICATION:- SUCCESSFUL
Thanks!
Metadata
Metadata
Assignees
Labels
[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] SoundnessKani failed to detect an issueKani failed to detect an issue