-
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
Towards Proving Memory Initialization #3264
Conversation
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.
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
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
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>
…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 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-checks
flag. Note that because it uses shadow memory under the hood, programs using this feature need to pass-Z ghost-state
flag 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.