<div dir="ltr">Hi All,<br clear="all"><div><br></div><div>    I&#39;m seeing an occasional crash in Cog when stepping the simulator when working on Spur.  The crash comes about when the system executes primitiveStoreStackp (primitive 76) as part of ContextPart&gt;&gt;push:, and a code compaction occurs within the primitive.  The crash.dmp file looks like the following (eliding for brevity):</div>
<div><br></div><div><div><div><span class="" style="white-space:pre">        </span>Bus error Sat Sep 21 06:03:12 2013</div><div><span class="" style="white-space:pre">        </span>...</div><div><span class="" style="white-space:pre">        </span>C stack backtrace:</div>
<div><span class="" style="white-space:pre">        </span>0   Squeak                              0x000700a1 reportStackState + 145</div><div><span class="" style="white-space:pre">        </span>1   Squeak                              0x00070a32 sigsegv + 306</div>
<div><span class="" style="white-space:pre">        </span>2   libSystem.B.dylib                   0x99fa105b _sigtramp + 43</div><div><span class="" style="white-space:pre">        </span>3   ???                                 0xffffffff 0x0 + 4294967295</div>
<div><span class="" style="white-space:pre">        </span>4   Squeak                              0x00101d9a interpret + 2970</div><div><span class="" style="white-space:pre">        </span>...</div><div><span class="" style="white-space:pre">        </span>Smalltalk stack dump:</div>
<div><span class="" style="white-space:pre">        </span>0xbffe2ae8 M MethodContext(ContextPart)&gt;push: 0x1d95abac: a(n) MethodContext</div><div><span class="" style="white-space:pre">        </span>0xbffe2b0c M MethodContext(ContextPart)&gt;return:from: 0x1d95ab50: a(n) MethodContext</div>
<div><span class="" style="white-space:pre">        </span>0xbffe2b34 I MethodContext(ContextPart)&gt;methodReturnReceiver 0x1d95ab50: a(n) MethodContext</div><div><span class="" style="white-space:pre">        </span>0xbffe2b5c M MethodContext(InstructionStream)&gt;interpretNextInstructionFor: 0x1d95ab50: a(n) MethodContext</div>
<div><span class="" style="white-space:pre">        </span>0xbffe2b78 M MethodContext(ContextPart)&gt;step 0x1d95ab50: a(n) MethodContext</div><div><span class="" style="white-space:pre">        </span>...</div><div><span class="" style="white-space:pre">        </span>Most recent primitives</div>
<div><span class="" style="white-space:pre">        </span>...</div><div><span class="" style="white-space:pre">        </span>primitiveWait</div><div><span class="" style="white-space:pre">        </span>at:put:</div><div><span class="" style="white-space:pre">        </span>signal</div>
<div><span class="" style="white-space:pre">        </span>@</div><div><span class="" style="white-space:pre">        </span>basicNew</div><div><span class="" style="white-space:pre">        </span>shallowCopy</div><div><span class="" style="white-space:pre">        </span>findSubstring:in:startingAt:matchTable:</div>
<div><span class="" style="white-space:pre">        </span>indexOfAscii:inString:startingAt:</div><div><span class="" style="white-space:pre">        </span>perform:</div><div><span class="" style="white-space:pre">        </span>objectAt:</div>
<div><span class="" style="white-space:pre">        </span>at:</div><div><span class="" style="white-space:pre">        </span>findNextUnwindContextUpTo:</div><div><span class="" style="white-space:pre">        </span>at:put:</div><div><span class="" style="white-space:pre">        </span>at:put:</div>
<div><span class="" style="white-space:pre">        </span>stackp:</div><div><span class="" style="white-space:pre">        </span>**CompactCode**</div></div></div><div><br></div><div>But this isn&#39;t telling me enough.</div><div><br>
</div><div>Firstly I&#39;ve just committed changes to <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Mac%20OS/vm/sqMacMain.c">http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Mac%20OS/vm/sqMacMain.c</a> and <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/unix/vm/sqUnixMain.c">http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/unix/vm/sqUnixMain.c</a> to also print the register state when the VM segfaults or gets sent SGUSR1 etc.  I can&#39;t test on FreeBSD.  If anyone builds with these changes on Free BSD can they please let me know if they work or not?</div>
<div><br></div><div>Secondly perhaps someone has a reproducible case coming from running e.g. ContextPart&gt;&gt;runAtEachStep: type code?  If so, please can I have a copy?</div><div><br></div><div>Lastly, if anyone has a crash that matches the above, but with the new crash dump info, I&#39;d love to see the crash.dmp file.</div>
<div><br></div><div>Thanks,</div><div>Eliot</div>
</div>