[Vm-dev] About Cog on linux

Igor Stasenko siguctua at gmail.com
Thu Feb 10 17:34:35 UTC 2011


Okay.. i started the debug session with StackVM /Debug build ..

Program received signal SIGSEGV, Segmentation fault.
0x0805dc1e in isContext (oop=0) at /home/sig/vmbuild/src/vm/gcc3x-interp.c:14374
Line number 14374 out of range;
/home/sig/vmbuild/src/vm/gcc3x-interp.c has 1 lines.
(gdb) bt
#0  0x0805dc1e in isContext (oop=0) at
/home/sig/vmbuild/src/vm/gcc3x-interp.c:14374
#1  0x08064dd9 in findMethodWithPrimitiveFromContextUpToContext
(primitive=<value optimized out>, senderContext=2040211164,
homeContext=<value optimized out>)
    at /home/sig/vmbuild/src/vm/gcc3x-interp.c:11733
#2  0x08064f4c in findMethodWithPrimitiveFromFPUpToContext
(primitive=<value optimized out>, startFP=<value optimized out>,
homeContext=<value optimized out>)
    at /home/sig/vmbuild/src/vm/gcc3x-interp.c:11808
#3  0x08074a4e in L0writeBackHeadFramePointers () at
/home/sig/vmbuild/src/vm/gcc3x-interp.c:3763
#4  0x080783d6 in initStackPagesAndInterpret () at
/home/sig/vmbuild/src/vm/gcc3x-interp.c:13895
#5  0x08072f99 in interpret () at /home/sig/vmbuild/src/vm/gcc3x-interp.c:1692
#6  0x080836e4 in main (argc=2, argv=0xbffff464, envp=0xbffff470) at
/home/sig/vmbuild/platforms/unix/vm/sqUnixMain.c:1659


oop=0 looks quite strange..
i suspecting there are some proper initialization missing, because it
is triggered so fast, almost at the start of code running.


And since error triggered in #snapshot:andQuit:
i suspecting there is something odd with image resuming. the image
expecting that primitive which resuming image should push either true
"means resuming" or false on stack..
and instead it pushing nil..
and then since there is a branch expecting boolean, no wonder that it
sends #mustBeBoolean, which then triggers the error...

Alas... i was thinking that Pharo recent modification to
#snapshot:andQuit:..  causing the error . But then i tried Squeak
image.. and got similar results:

Smalltalk stack dump:
0xbf8854c4 [] in ByteString(Object)>doesNotUnderstand: 2016701060:
a(n) ByteString
0xbf8854ec [] in SmalltalkImage>snapshot:andQuit:embedded: 2009189024:
a(n) SmalltalkImage
2016700076 s SmalltalkImage>snapshot:andQuit:
2016699984 s TheWorldMenu>saveAndQuit
2016699868 s TheWorldMenu>doMenuItem:with:


it looks like interpreter either eats some object on stack, or
otherwise forgots to push it there, or maybe resuming from wrong
instruction pointer.

Anyways, something goes awfully wrong at the very beginning of
interpret cycle. Which means its having good chances to be catched :)

-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list