Closed
Description
I did not manage to reproduce in a minimal sample, but in my application, I ended up with:
let x = …;
let y = …;
println!("{:p} == {:p} ? {}", x, y, ptr::eq(x, y));
printing:
0x7f87a8c3a618 == 0x7f87a8c3a618 ? false
After investigations (and discussion on freenode/##rust), it appeared that x
and y
were fat pointers having the same data part (the 64 first bits), but a different vtable (the last 64 bits).
I applied this patch to my application, which solves the reported issue: Genymobile/gnirehtet@c36fa4d
But I can't understand how two fat pointers for the same objects may have different vtables. Is it expected?