<div dir="ltr">Hi guys,<div><br></div><div>I am debugging a Pharo VM crash I am having and I cannot figure out what it is exactly. I suspect it might be related to block closures compilation but I am not sure. I have a reproducible crash test under Pharo 4.0 and OSX. </div><div><br></div><div>I built a VM in debug mode and I run it via gdb. This is the kind of info I am able to see:</div><div><br></div><div><div><i>Program received signal SIGSEGV, Segmentation fault.</i></div><div><i>0x000ab66b in updatePointersInRangeFromto (memStart=924623948, memEnd=928201420) at /Users/mariano/Pharo/git/pharo-vm/src/vm/gcc3x-cointerp.c:40444</i></div><div><i>40444<span class="" style="white-space:pre">                                        </span> &amp;&amp; (((longAt(fieldOop)) &amp; MarkBit) != 0)) {</i></div><div><i>(gdb) call printAllStacks()</i></div><div><i>Process 0x30e228c4 priority 40</i></div><div><i>0xbffb2e10 M FaAction class&gt;block: 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e30 M BlockClosure(FaMemoryStoreSession)&gt;register: 0x371d0968: a(n) BlockClosure</i></div><div><i>0xbffb2e4c M INVALID RECEIVER&gt;register: 0x371cfd54: a(n) bad class</i></div><div><i><br></i></div><div><i>(callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil)) 48626</i></div><div><i>0x3721e1f0 is not a context</i></div><div><i>0x371c34b4 is not a context</i></div><div><br></div><div>And another crash:</div><div><br></div><div><div><i>Program received signal SIGSEGV, Segmentation fault.</i></div><div><i>0x000ab66b in updatePointersInRangeFromto (memStart=924677864, memEnd=928262300) at /Users/mariano/Pharo/git/pharo-vm/src/vm/gcc3x-cointerp.c:40444</i></div><div><i>40444<span class="" style="white-space:pre">                                        </span> &amp;&amp; (((longAt(fieldOop)) &amp; MarkBit) != 0)) {</i></div><div><i>(gdb) call printAllStacks()</i></div><div><i>Process 0x30e228c4 priority 40</i></div><div><i>0xbffb2de0 M INVALID RECEIVER&gt;initialize 0x3722b9a0: a(n) bad class</i></div><div><i>0xbffb2df8 M FaAction class(Behavior)&gt;new 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e10 M FaAction class&gt;block: 0x20ebb104: a(n) FaAction class</i></div><div><i>0xbffb2e30 M INVALID RECEIVER&gt;register: 0x371ddee0: a(n) bad class</i></div><div><i>0xbffb2e4c M INVALID RECEIVER&gt;register: 0x371dd328 is in old space</i></div><div><i><br></i></div><div><i>(callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil)) 48626</i></div><div><i>0x3722b750 is not a context</i></div><div><i>[New Thread 0x1b43 of process 5886]</i></div><div><i>[New Thread 0x1d2f of process 5886]</i></div><div><i>[New Thread 0x1f07 of process 5886]</i></div><div><i>[New Thread 0x1e07 of process 5886]</i></div><div><br></div><div>From what I can see in <i>#printActivationNameFor: aMethod receiver: anObject isBlock: isBlock firstTemporary: maybeMessage</i></div></div><div>It looks like if the memory address is not an OOP, nor forwarding pointer nor...</div><div><br></div><div>It also seems like the above stack I can get is not the real cause but a side effect that makes GC to crash (#updatePointersInRangeFromto)</div><div><br></div><div>As said, I have a way to reproduce the crash, and I already have the VM compiled in debug and gdb running. I can also attach the full output of the gdb stack. </div><div><br></div><div>BTW.... in the output of the gdb I see lots of printings like:</div><div><br></div><div><i>(numStack + ReceiverIndex) &lt; (lengthOf(theContext)) 45421</i></div><div><i>(ReceiverIndex + contextSize) &lt; (lengthOfbaseHeaderformat(oop, header2, fmt)) 40416</i><br></div><div><br></div><div><br></div><div>Any pointer is appreciated.</div><div><br></div><div>Thanks!</div><div><br></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>