-
Notifications
You must be signed in to change notification settings - Fork 147
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
Merged
Merged
Changes from all commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
52c01aa
Towards implementing uninitialized memory detection in raw pointers
artemagvanian 2b73af7
Implement uninitialized memory detection in raw pointers for certain …
artemagvanian f3edc52
Implement wide pointer decomposition as part of kani library
artemagvanian 57c31d4
Ensure checks are executed before instructions and statements -- after
artemagvanian 1006fbe
Move tests under tests/kani
artemagvanian fc224de
Implement drop blessing
artemagvanian c755ac9
Fix check insertion order
artemagvanian 9b2be02
Autoinitialize extern in alloc::alloc
artemagvanian e901ebb
Implement support for vtable wide pointers
artemagvanian 4e0c348
Clean up tests, preserve types in shadow memory calls
artemagvanian 1d6e167
Skip analyzing pointers to trait objects for now
artemagvanian 7e26dac
Slight cleanup
artemagvanian da8c891
Merge branch 'main' into main
artemagvanian c8a8d1f
Update code to work with nightly-2024-06-17
artemagvanian 087090a
Add missing copyright statements
artemagvanian 73a7ccb
Make clippy happy
artemagvanian 1e55cb7
Make clippy even happier
artemagvanian 97ce8a2
Implement an option to enable initialization checks as a part of func…
artemagvanian 459acba
Separate `can_dereference` from `is_initialized` for now
artemagvanian d3ab562
Filter out all instances without body to fix MIR dumping
artemagvanian 73ae723
Handle intrinsics exhaustively
artemagvanian 54a3970
Fix code formatting
artemagvanian 8aa56e3
Disable initializations checks in `std-checks` to make CI pass
artemagvanian d833c2b
Merge branch 'main' into main
artemagvanian aefec83
Automatically add global shadow memory to `modifies` contract clause
artemagvanian 7a72bbd
Only inject shadow memory symbol if defined
artemagvanian 09f8ecc
Make clippy happy
artemagvanian ca4da40
Remove stray unwrap
artemagvanian 3bdc949
Add memory initialization checks to `std-verify`
artemagvanian 55b62c4
Fix `expected` files
artemagvanian e983934
Adjust container size for the harness
artemagvanian 0c8ec39
Skip initialization checks based on the attribute
artemagvanian 2986704
Add comment explaining `skip_first`
artemagvanian 4a43c95
Cache the result of `find_fn_def`
artemagvanian 405e34a
Refactor code re: comments
artemagvanian ba2d5df
More refactoring for cleaner type layout
artemagvanian a729cd2
Undo temporary fix to `--emit mir`
artemagvanian c61b16d
Move `skip_first` from MutableBody to transformation pass
artemagvanian 4feda97
Add some docs for `is_initialized_body`
artemagvanian d9eacd7
Remove `transmute` inside `shadow.rs`, document type layout, carve ou…
artemagvanian 7174eba
Incorporate `is_initialized` into `can_dereference` and `can_read_una…
artemagvanian d4ced45
Add more comments to `UninitPass`
artemagvanian 0ec8c3b
Merge branch 'main' into main
artemagvanian 2640b3f
Fix bug when inserting a terminator after a terminator
artemagvanian 98e8a37
Put memory initialization checking into a separate module
artemagvanian cc32650
Add initialization checks into `kani::mem`
artemagvanian 3dbf70d
Perform FnDef caching inside instrumentation passes
artemagvanian 226c502
Only expose byte mask for type layout
artemagvanian 839a79c
Update a comment
artemagvanian d6423ce
Further changes to `ty_layout`
artemagvanian a74bad0
Further changed to`kani_intrinsics`
artemagvanian 54f6284
Extract function resolution associated with `get_kani_sm_function` in…
artemagvanian 1760369
Support determining type layout of enums with variants of the exact s…
artemagvanian 4894296
`assert(false)` on using pointers to trait objects
artemagvanian db309e0
Make clippy happy
artemagvanian dc99603
Merge branch 'main' into main
artemagvanian 1718666
Remove unnecessary call to `ty_size`
artemagvanian dd71adf
Move tests around, temporarily disable `std-checks`
artemagvanian 224239f
Split `split_bb` into two functions
artemagvanian 496bb8b
Merge branch 'main' into main
artemagvanian 9706df2
Add missing `is_initialized` definition into `kani_core`
artemagvanian 43f88c6
Temporarily decouple `is_initialized` and `can_dereference` so that C…
artemagvanian 4d7a97f
Add missing flag
artemagvanian 1a80d98
Formatting change
artemagvanian ab6fbc9
Disable memory initialization checks for `std-core`
artemagvanian 438a3b4
Fix determining type layout for enums
artemagvanian e7f3972
Make `is_initialized` a noop if `-Z uninit-checks` flag is not set
artemagvanian 58e62eb
Merge branch 'main' into main
artemagvanian 910f555
Clean up test files
artemagvanian 5966c81
Fix comments inside some tests
artemagvanian 37c03c4
Fix function documentation
artemagvanian 6a7ea31
Small formatting change
artemagvanian 6146a4b
Changes to `slice.rs`
artemagvanian ce454a3
Merge `mem_swap` and `mem_replace` into `mem`
artemagvanian 3dab8d3
Rename `try_mark_new_bb_as_skipped`
artemagvanian 2e34fa5
Mark changing the initialization state of a trait object as unreachable
artemagvanian 96238df
Add a better comment for `mk_layout_operand`
artemagvanian 01fb654
Add a better doc comment to `Layout`
artemagvanian e42bdfd
Rename `SourceOp` to `MemoryInitOp`, add comments
artemagvanian 2fe3c7c
Remove unnecessary fields in `MemoryInitOp::Get` and `MemoryInitOp::U…
artemagvanian d924a9b
Pre-filter intrinsics before instrumenting them
artemagvanian 0136480
Add comment about instrumentation pass order
artemagvanian 1996b05
Merge branch 'main' into main
artemagvanian 9edcd6a
Assert that enum tag has the offset of zero
artemagvanian c75b616
Inline `scalar_ty_size`
artemagvanian f4ac75c
Merge branch 'main' into main
artemagvanian 683d365
Apply changes from comments to `perf/uninit`
artemagvanian 28b3a03
Merge branch 'main' into main
artemagvanian 90af616
Add extra docs to `UninitVisitor`
artemagvanian 4b8dcd5
Move some functions in `uninit_visitor.rs` around
artemagvanian 1ab140b
Reorganize handling of intrinsics
artemagvanian f266ea9
Rename `MemoryInitOp::Get` to `MemoryInitOp::Check`
artemagvanian a1dccb2
Throw an error only if the unsize cast happens to a pointer to trait …
artemagvanian bbfd443
Add logic to track additional pointer dereferences in `StatementKind:…
artemagvanian b882bce
Merge branch 'main' into main
artemagvanian bda552e
Merge branch 'main' into main
artemagvanian ca62743
Merge branch 'main' into main
artemagvanian c91496f
Update kani-compiler/src/kani_middle/transform/check_uninit/uninit_vi…
artemagvanian 839df71
Update incorrect comment in `uninit_visitor.rs`
artemagvanian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.