Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fuzz: remove potential undefined behavior in chaos harness
The chaos harness has a potential UB bug reported by Miri due to mutable pointer aliasing. The `heap` object has a mutable reference to `HEAP_MEM`, which gets invalidated when calculating `remaining_space`, as it does so through a mut pointer. Thus, using `heap` after using the pointer is technically undefined behavior under Rust's aliasing rules. Fix this by taking a const pointer. Note that it is very unlikely this caused any actual issues under the current state of the compiler. Signed-off-by: Carlos López <[email protected]>
- Loading branch information