-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyze: implement Box<T> rewrites (#1106)
This branch adds rewrites to convert pointers with the `FREE` permission into `Box<T>`. This follows the dynamic ownership tracking proposal in #1097. Specific changes: * Adds a new `dyn_owned: bool` field to `TypeDesc`, which indicates that the pointer type should be wrapped in a dynamic ownership wrapper. * Extends `ZeroizeType` handling to support zero-initializing some pointer types (necessary to allow `malloc`/`calloc` of structs that contain pointers). * Adds support for `Box` and `dyn_owned` related casts in `mir_op` and `rewrite::expr::convert`. * Adds custom rewrite rules for `malloc`, `calloc`, `free`, and `realloc`.
- Loading branch information
Showing
8 changed files
with
786 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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 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 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.