
22 Nov
2017
22 Nov
'17
5:22 p.m.
Hello, Can reallyUnsafePtrEquality give false positives? I can see how it can give false negatives (eg, compiler optimisations increasing or decreasing sharing), but I'm not so sure if it can give false positives. I don't see how in a garbage collected language two live values could compare reference equal. Unless the implementation is something like: reallyUnsafePtrEquality a b = getptr a == getptr b ...as that then means that if the GC moves things after `getptr a` is evaluated but before `getptr b` is, then you could get a false positive. But that doesn't seem like a sensible implementation to me, because then reallyUnsafePtrEquality would surely be totally useless. -- Michael Walker (http://www.barrucadu.co.uk)