You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments