<div dir="ltr"><div>According to Edwark Kmett it can give false positives as well, or at least could in 2010: <a href="https://mail.haskell.org/pipermail/haskell-cafe/2010-June/079532.html">https://mail.haskell.org/pipermail/haskell-cafe/2010-June/079532.html</a><br><br></div>Erik<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 November 2017 at 20:06, Andrew Martin <span dir="ltr"><<a href="mailto:andrew.thaddeus@gmail.com" target="_blank">andrew.thaddeus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It cannot give false positives. If it could, that would make it totally worthless.<br>
<br>
Sent from my iPhone<br>
<div class="HOEnZb"><div class="h5"><br>
> On Nov 22, 2017, at 12:22 PM, Michael Walker <<a href="mailto:mike@barrucadu.co.uk">mike@barrucadu.co.uk</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> Can reallyUnsafePtrEquality give false positives? I can see how it<br>
> can give false negatives (eg, compiler optimisations increasing or<br>
> decreasing sharing), but I'm not so sure if it can give false<br>
> positives.<br>
><br>
> I don't see how in a garbage collected language two live values could<br>
> compare reference equal. Unless the implementation is something like:<br>
><br>
> reallyUnsafePtrEquality a b = getptr a == getptr b<br>
><br>
> ...as that then means that if the GC moves things after `getptr a` is<br>
> evaluated but before `getptr b` is, then you could get a false<br>
> positive. But that doesn't seem like a sensible implementation to me,<br>
> because then reallyUnsafePtrEquality would surely be totally useless.<br>
><br>
> --<br>
> Michael Walker (<a href="http://www.barrucadu.co.uk" rel="noreferrer" target="_blank">http://www.barrucadu.co.uk</a>)<br>
> ______________________________<wbr>_________________<br>
> Haskell-Cafe mailing list<br>
> To (un)subscribe, modify options or view archives go to:<br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
> Only members subscribed via the mailman list are allowed to post.<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br></div>