Closed Strophox closed 1 month ago
but this means returned ptrs may overlap
"overlap" isn't quite right, since arguably ranges with with size 0 can never overlap.
But two different allocations can end up at the same address, and that's a problem.
but this surprisingly failed all tests:
Why did they fail? Setting the size to 1 should work and avoids duplicating logic so please figure out why it did not work.
@bors r+
:pushpin: Commit 120efdc55ed50bdc551d666ab7aa34cb2970277d has been approved by RalfJung
It is now in the queue for this repository.
:hourglass: Testing commit 120efdc55ed50bdc551d666ab7aa34cb2970277d with merge d7ddcaf845690e9896ea75ffda96e9ecfa98629f...
:sunny: Test successful - checks-actions Approved by: RalfJung Pushing d7ddcaf845690e9896ea75ffda96e9ecfa98629f to master...
Fix in
alloc_bytes.rs
following https://github.com/rust-lang/miri/pull/3526Currently when an allocation of
size == 0
is requested we return astd::ptr::without_provenance_mut(align)
, but this means returnedptr
s may overlap, which breaks things.