[Vm-dev] CogVM/StackVM fail to read in image, fine on Squeak 4.2.1 MacVM

Igor Stasenko siguctua at gmail.com
Tue Jul 19 01:04:58 UTC 2011


On 19 July 2011 02:43, Stefan Marr <squeak at stefan-marr.de> wrote:
>
> Hi:
>
> On 18/07/11 15:01, Stefan Marr wrote:
>>
>> Hi Dave:
>>
>> On 18/07/11 14:34, David T. Lewis wrote:
>>>
>>> On Mon, Jul 18, 2011 at 02:02:10PM +0200, Stefan Marr wrote:
>>>>
>>>> However, now I noticed that the CogVM/StackVM crash when they are asked
>>>> to load an image which is saved by our RoarVM.
>>>>
>>>> The Cog/StackVM fail to open it with an error in "0
>>>> org.squeakfoundation.Squeak       0x00033462
>>>> readImageFromFileHeapSizeStartingAt + 3058"
>>>>
>>>> [1] http://soft.vub.ac.be/~smarr/roarvm/squeak-saved-with-rvm.zip
>>
>> I took the standard stock Squeak 4.2 image, which is as far as I can tell
>> published as 6504.
>>
>> Now, I open and save it with the RoarVM, and then try to open it with
>> Stack/CogVM, which crashes.
>
> I tried to dig into this a bit more.
>
> The latest StackInterpreterSimulator in the image provided by Eliot on the
> Cog branch seems to read the image [1] just fine.
> It seems to hang, but might also be that I am to inpatient.
>
> Anyway, a debug build of
> http://www.squeakvm.org/unix/release/Squeak-4.4.7.2357-src.tar.gz loads the
> image, too.
>
> The available 5.x mac releases fail to load it: http://www.squeakvm.org/mac/
>
> So, I took the Cog branch and the CoreVM.xcodeproj and got a VM compiled:
>
> #0  0x00104f80 in initializeInterpreter (bytesToShift=339693560) at
> /tmp/Cog/macbuild/../src/vm/gcc3x-cointerp.c:17479
>    ccIndex = 0
>    cct = 394155372
>    classArrayClass = 401932980
>    classArrayObj = 400674088
>    header = 317718813
>    i = 17402624
>    i1 = 1
>    i11 = 411556616
>    i2 = 317431
>    i3 = -1073746952
>    i4 = 11
>    index = -2
>    oop = 10
>
> #1  0x00123fc0 in readImageFromFileHeapSizeStartingAt (f=0xa064d8e0,
> desiredHeapSize=536870912, imageOffset=0) at
> /tmp/Cog/macbuild/../src/vm/gcc3x-cointerp.c:39218
> #2  0x000652dc in main (argc=1, argv=0xbffff278, envp=0xbffff280) at
> /tmp/Cog/macbuild/../platforms/Mac OS/vm/sqMacMain.c:445
>
>
> Where the code is:
>
> 17474                GIV(thisClassIndex) = i4;
> 17475            }
> 17476        }
> 17477        for (i4 = (InstanceSpecificationIndex + 1); i4 <=
> (lengthOf(classArrayObj)); i4 += 1) {
> 17478            oop = longAt((classArrayObj + BaseHeaderSize) + (i4 <<
> ShiftForWord));
> -> 17479            if ((((oop & 1) == 0)
> 17480 && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
> 17481 && (((lengthOf(oop)) == 5)
> 17482 && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
> 17483                GIV(classNameIndex) = i4;
> 17484            }
> 17485        }
>
>
> Any guesses what is going on here?
>
looks like it tries to discover the name ivar index for class objects.

> Thanks
> Stefan
>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list