We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94eb92b commit 84a39b9Copy full SHA for 84a39b9
tests/expected/dealloc/stack/expected
@@ -0,0 +1,4 @@
1
+Status: FAILURE\
2
+Description: "free argument must be dynamic object"
3
+
4
+VERIFICATION:- FAILED
tests/expected/dealloc/stack/test.rs
@@ -0,0 +1,17 @@
+// Copyright Kani Contributors
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+use std::alloc::{dealloc, Layout};
5
6
+// This test checks that Kani flags the deallocation of a stack-allocated
7
+// variable
8
9
+#[kani::proof]
10
+fn check_dealloc_stack() {
11
+ let mut x = 6;
12
+ let layout = Layout::new::<i32>();
13
+ let p = &mut x as *mut i32;
14
+ unsafe {
15
+ dealloc(p as *mut u8, layout);
16
+ }
17
+}
0 commit comments