[Vm-dev] Reproducible way to crash Cog ( [Lsehub-staff] Strange behavior )

Igor Stasenko siguctua at gmail.com
Wed Dec 8 21:28:32 UTC 2010


Hello, Eliot

today i tried to help and see what is strange (see original message
below).. and followed the instructions, but instead of 'strange' i got
VM crash. ;)

I tried multiple Mac Cog VMs (one built by me, another, built by you),
and both crashing during GC.

To reproduce, take the latest pharo-core image
(http://www.pharo-project.org/pharo-download/unstable-core)
Then evaluate following:

Gofer new
squeaksource: 'Seed';
package: 'Seed-HaselBuilder';
load.


Then evaluate
   HaselKernelBuilder new script.

if next to that you do (if it not crashed already)

Smalltalk garbageCollect.


and VM will crash guaranteed (or become unresponsive).

I didn't investigated deeply, but i found that culprit is most probably in
HaselKernelBuilder>>copyClass:



@ Benjamin. You have a mistake in your code (and that i think why it
behaves 'strange')
you setting the class of class to be the instance of 'metacopy'

so, you have

class copy -> metaclass copy basicNew -> metaclass copy

('->' here means 'instance of' )

while it should be

class copy -> metaclass copy

So

cpy primitiveChangeClassTo: metaCopy basicNew.

actually should be

cpy primitiveChangeClassTo: metaCopy.


---------- Forwarded message ----------
From: Benjamin <benjamin.vanryseghem at gmail.com>
Date: 8 December 2010 17:15
Subject: [Lsehub-staff] Strange behavior
To: RMoD private list <lsehub-staff at lists.gforge.inria.fr>


Hello guys,

I've a strange error when I'm trying to trace some objects, and even
after spending the whole day on it, I still do not understand why, so
if you have any idea, you're welcome :)


Source :

Gofer new
squeaksource: 'Seed';
package: 'Seed-HaselBuilder';
load.


Method :

Then open a Transcript and evaluate

HaselKernelBuilder new script.
tracedObjects := Dictionary new. objects := Dictionary new. object :=
Object. HaselImageBuilder new trace: object in: objects from: nil
tracedObjects: tracedObjects.


Thank you in advance,


Ben



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list