<div><div><div class="gmail_quote">On 13 May 2011 16:08, Nahuel Greco <span dir="ltr"><<a href="mailto:ngreco@gmail.com" target="_blank">ngreco@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sam, check this thread:<br>
<br>
<a href="http://thread.gmane.org/gmane.comp.lang.erlang.general/47310" target="_blank">http://thread.gmane.org/gmane.comp.lang.erlang.general/47310</a><br>
<br>
Saludos,<br>
<font color="#888888">Nahuel Greco.<br>
</font><div><div></div><div><br></div></div></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8">Ah yes that seems to match exactly what I've observed!<div><br></div><div>Thanks for that :-)<br>
<div><br></div><div>I agree with your (and Matthias') comments in that it should be changed in accordance with the patch!</div><div>In my opinion the current system is confusing and therefore dangerous.</div><div><br>
</div><div>Hmm... from poking around in the emulator code it looks like the "hash" is made up of three components XOR'ed together:</div><div><br></div><div>* the index</div><div>* the module's name</div>
<div>* a "uniq" value</div><div><br></div><div>Since during code reloading, the module name and index could easily be the same... if the uniq were the same then the emulator would be fooled into thinking it was OK to use the new version of the code... when it was not OK.</div>
<div><br></div><div>I couldn't see what system was used to set the uniq value ("old_uniq" in most of the code I saw)... does anyone know what it is?</div><div><br></div><div>Even without knowing the algorithm, if I can control the Fun's index, and I can see it's uniq, I can probably cause a hash collision by setting the index to a specific value.</div>
<div><br></div><div>The reason I ask is that I'm wondering if a hash collision is possible and if that has the potential to crash the emulator.</div><div><br></div><div>Sam.</div><div><br></div></div></div></div>
</div>