<br><br><div class="gmail_quote">On Fri, May 25, 2012 at 12:57 AM, Fabrizio Perin <span dir="ltr">&lt;<a href="mailto:fabrizio.perin@gmail.com" target="_blank">fabrizio.perin@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">
<div class="gmail_quote">Hi,<br>I&#39;m using last Moose build on top of CogVM 2550 and each time I click on a method an error pops up (see the attachment). The same problem I have it with older builds of Moose but I don&#39;t have any problem if I open the same image with Cog VM 2540 or CogVM from the Pharo web site.<br>
</div></blockquote><div><br></div><div>I changed the definition of at: for CompiledMethod to prevent it accessing bytes outside of the bytecodes part of a compiled method.  What&#39;s happening here is that a hash is being derived form the compiled method by looking at the pointers part of the compiled method (i.e. bytes &lt; aMethod initialPC).  But it is wrong to try and derive a hash from these bytes.  Since the GC can move objects these bytes can change as the GC moves the literals a method references (unlike the bytes between: aMethod initialPC and: aMethod size).</div>
<div><br></div><div>Two conclusions:</div><div><br></div><div>The solution is to define CompiledMethod&gt;hash such that it does not access bytes &lt; initialPC.  The hash it is inheriting from ByteArray is fine for ByteArray but not at all OK for CompiledMethod.</div>
<div><br></div><div>The VM is revealing a latent bug, i.e. that on older VMs the system could be computing a variable hash, and hence result in not-found errors in certain circumstances, hence the VM is right to impose this stricter bounds checking.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">

<br>I&#39;m on Mac os 10.7.4 and the image is:<br><br>Pharo1.4<br>Latest update: #14438<br><br>Cheers,<br>Fabrizio <br>
</div><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>