-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stable-symbolic: Properly initialize immutable malloc'd memory
Previously, `stable-symbolic` would only initialize mutable memory with symbolic bytes when calling `malloc`. `malloc` can also be used to initialize immutable memory, however, so we must also account for this possibility when `stable-symbolic` is enabled. To this end, we create a new `doConstStoreStableSymbolic` function that is like `doStoreStableSymbolic`, but does not check if the memory being written to is mutable. (This is very much in the spirit of the existing `doArrayStore`/`doArrayConstStore`, `storeRaw`/`storeConstRaw`, and `mallocRaw`/`mallocConstRaw` split.) We then pick between `doStoreStableSymbolic` and `doConstStoreStableSymbolic` in the override for `malloc` depending on whether the memory is mutable or immutable, respectively. See GaloisInc/saw-script#1691 for the motivation behind this bugfix.
- Loading branch information
1 parent
2d547dd
commit 0fa9c97
Showing
1 changed file
with
60 additions
and
5 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