-
Notifications
You must be signed in to change notification settings - Fork 134
Towards Proving Memory Initialization #3264
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
Conversation
celinval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
celinval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
celinval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
…sitor.rs Co-authored-by: Celina G. Val <[email protected]>
…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 <[email protected]>
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.