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
can be true or false depending on how these promoteds get deduplicated. Even for explicit local variables
let x = 42;let y = 42;&x as*constu32 == &y as*constu32
an optimizer may merge the two variables if they are guaranteed equal (especially if their types are Copy).
So we can essentially only compare live heap allocations, static items and mutable local variables, since these are guaranteed distinct in all models I know.
The text was updated successfully, but these errors were encountered:
In https://github.com/solson/miri/blob/80a6e739424728d7505587ea6c53c39d6687cb59/src/operator.rs#L151 we compare pointers directly, even if they are from different allocations, as long as both are inbounds of live allocations.
Unfortunately optimizations might bite us:
can be
true
orfalse
depending on how these promoteds get deduplicated. Even for explicit local variablesan optimizer may merge the two variables if they are guaranteed equal (especially if their types are
Copy
).So we can essentially only compare live heap allocations, static items and mutable local variables, since these are guaranteed distinct in all models I know.
The text was updated successfully, but these errors were encountered: