<br><br><div class="gmail_quote">On Thu, May 10, 2012 at 10:16 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt;&gt; I should add, it&#39;s already happened.  In 2009 Levente changed<br>
&gt;&gt; Object&gt;&gt;#identityHash to answer the scaledIdentityHash.<br>
&gt;<br>
&gt; Not in Squeak. Our IdentityDictionary uses scaledIdentityHash nowadays, but identityHash itself is left alone, answering the primitive value directly.<br>
<br>
I meant to say Object&gt;&gt;#hash, not #identityHash.<br>
<br>
So, before 12/1/2009:<br>
<br>
     true hash  &quot;2950&quot;<br>
<br>
but after 12/1/2009<br>
<br>
     true hash  &quot;773324800&quot;<br>
<br>
So, any saved persistent EToys ReferenceStream object-models files<br>
with true involved in the calculation of #hash prior to 2009 will now<br>
be goofed up unless you remember to rehash all regular Dictionary&#39;s<br>
after loading it.  The properties of this bug are:<br>
<br>
  - it is hidden, you had no idea it was there because no SUnit test<br>
can possibly catch it.  It didn&#39;t show until production.<br>
  - it is image-specific -- you load the file an image before<br>
Levente&#39;s change and everything seems fine.  What&#39;s going on?<br>
  - it is &quot;intermittent&quot; because there&#39;s a small possibility that, if<br>
the Dictionary were small, you might get lucky with a &quot;hit&quot; anyway<br>
when calculating the slot to start searching at<br>
  - it could lead to corrupt data model, because perhaps the app does<br>
something like #at:ifAbsentPut:, and maybe even on an<br>
otherwise-equivalent object, so you end up with TWO of the &quot;same&quot;<br>
object in the dictionary.  What a disaster!<br>
<br>
Now does it make sense?<br></blockquote><div><br></div><div>No.  One *always* has to rehash on loading binary since one cannot guarantee that identityHashes will be the same in the loading environment as the saving environment.  It s a non-issue. </div>
</div><br>-- <br>best,<div>Eliot</div><br>