-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious failure when calling vec!
with a size of zero
#90
Comments
The spurious failure only happens when calling #[kani::proof]
fn main() {
let v: Vec<i8> = vec![kani::any(); 0];
} This produces:
If I change
|
vec!
with a size of zero
Actually, I get the spurious failure even without using #[kani::proof]
fn main() {
let v: Vec<i8> = vec![5; 0];
} I suspect this might be to the dangling pointer issue that we've seen previously with vectors of size 0. |
|
Here are a few limitations: 1. Harness for`write_bytes` was disabled due to: - Issue model-checking/kani#90. 2. The harnesses explicitly disable cases where a pointer is dangling. - Kani cannot make assumptions on pointer allocation for dead or dangling pointers (model-checking/kani#2300). 3. Actual intrinsics are very hard to verify with Kani. The cases we can verify are those that have wrappers around the actual intrinsic. - Issue model-checking/kani#3345 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Co-authored-by: Michael Tautschnig <mt@debian.org> Co-authored-by: Michael Tautschnig <tautschn@amazon.com>
#79 added a new test in
rust-tests/cbmc-reg/NondetVectors/fixme_main.rs
where a Vector is initialized with a nondet. value, but this is not supported at the moment.The text was updated successfully, but these errors were encountered: