Towards Proving Memory Initialization#3264
Merged
artemagvanian merged 99 commits intomodel-checking:mainfrom Jul 2, 2024
Merged
Towards Proving Memory Initialization#3264artemagvanian merged 99 commits intomodel-checking:mainfrom
artemagvanian merged 99 commits intomodel-checking:mainfrom
Conversation
celinval
reviewed
Jun 13, 2024
celinval
reviewed
Jun 13, 2024
Contributor
celinval
left a comment
There was a problem hiding this comment.
Can you please double check that invoking methods through the vtable works well? You can for example test drop of Box<dyn Debug> for cases where it is a valid value or it is an uninitialized value.
14 tasks
celinval
reviewed
Jun 28, 2024
Contributor
celinval
left a comment
There was a problem hiding this comment.
So close!! Can you please add a few tests for catching intrinsics misuse?
kani-compiler/src/kani_middle/transform/check_uninit/uninit_visitor.rs
Outdated
Show resolved
Hide resolved
kani-compiler/src/kani_middle/transform/check_uninit/uninit_visitor.rs
Outdated
Show resolved
Hide resolved
kani-compiler/src/kani_middle/transform/check_uninit/uninit_visitor.rs
Outdated
Show resolved
Hide resolved
kani-compiler/src/kani_middle/transform/check_uninit/uninit_visitor.rs
Outdated
Show resolved
Hide resolved
…sitor.rs Co-authored-by: Celina G. Val <celinval@amazon.com>
artemagvanian
added a commit
that referenced
this pull request
Jul 12, 2024
…cks (#3313) This is a follow-up PR for #3264, a part of the larger work towards #3300. This PR introduces: - Use of demonic non-determinism (prophecy variables) to improve memory initialization checks performance; - Instead of keeping track of memory initialization of each possibly uninitialized byte pointed to by some pointer, one is chosen non-deterministically; - Tests for proper memory initialization checks injection for compiler intrinsics; - Separate functions for checking memory initialization of slice chunks. 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: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables automatic memory initialization proofs for raw pointers in Kani. This is done without any extra instrumentation from the user.
Currently, due to high memory consumption and only partial support of pointee types for which memory initialization proofs work, this feature is gated behind
-Z uninit-checksflag. Note that because it uses shadow memory under the hood, programs using this feature need to pass-Z ghost-stateflag as well.This PR is a part of working towards #3300.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.