Failed check: memmove.assigns in Memory operations API #142
Unanswered
Dhvani-Kapadia
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I have the same error for
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @Dhvani-Kapadia, @danielhumanmod. Both functions modify the object, so a modifies-clause is needed. See https://model-checking.github.io/kani/crates/doc/kani/contracts/index.html#write-sets for details. You can also look at some examples in https://github.com/model-checking/kani/tree/main/tests/expected/function-contract/modifies. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ran into a failed check for both copy_to and copy_from API. Can a clause be added to the contract to make it successful? The exact error message is:
Failure without assigns: Check 7: memmove.assigns.2 - Status: FAILURE - Description: "Check that array_replace((const void *)(char *)dest, ...) is allowed by the assigns clause" - Location: <builtin-library-memmove>:34 in function memmove
This is the contract I wrote for copy_to:
`#[kani::requires(count * core::mem::size_of::() <= isize::MAX as usize)]
Beta Was this translation helpful? Give feedback.
All reactions