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
Due to the API exposed by the VolatileMemory trait constructing
a VolatileSlice from an immutable reference, this impl allowed
mutation through an immutable reference. This is because the
signature of `get_slice` has its first argument desugar to
`&&mut [u8]` instead of `&mut [u8]` (note the double reference).
This caused undefined behavior due to a cast from immutable
reference to mutable pointer.
The implementation has been replaced with `From<&mut [u8]> for
VolatileSlice`, which is safe.
Since this impl was only used in testing code, the impact of this
breaking change should be low.
For the same reasons, the `VecMem` struct in volatile_memory::tests
has been removed.
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments