[Vm-dev] debugging the garbage collector

Noah Evans noah.evans at gmail.com
Fri Feb 15 22:09:58 UTC 2013


Quick update. I have the svn co http://squeakvm.org/svn/squeak/trunk
compiling and loading an image on Plan 9. It GCs successfully (I
hadn't decremented the stack somewhere I should have) but it's now
giving me several strange stack and floating point behaviors (I've
seen this before with Cog).

The first of strange behavior is that my stack is backwards.

0.0/1023.0 (setting up color intensity)

is being sent as

1023.0/0.0

This would not be a problem that leads to a trap, however the
denominator of 0.0 does not trigger:

if (!(arg != 0.0)) {
	if (!foo->primFailCode) {
		foo->primFailCode = 1;
	}
}

which leads to a divide by zero trap. I'm going to look at Plan 9's
floating point code to see if I can learn more about what's going on.

Any ideas for debugging the stack?

Noah


On Fri, Feb 15, 2013 at 7:42 PM, tim Rowledge <tim at rowledge.org> wrote:
>
>
> On 15-02-2013, at 10:36 AM, Noah Evans <noah.evans at gmail.com> wrote:
>
>>
>> I already have something (almost) running on the gitorous Cog using
>> the mismatched spoon interp.c. It does events and tries to blit
>> already. I was intending to move to move to the vanilla interpreter
>> afterwards.
>>
>> If I understand you correctly, you're recommending I rebase using the
>> interpreter and move to Cog later.
>
>
> Yup. Start with the simple stuff. Start with a properly matched tree of files. Makes life plausibly survivable. Your current approach seems rather like trying to bootstrap civilisation directly from open fires to fusion generators. You might manage it but why make things harder than necessary for maximum pleasure?
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Try not to let implementation details sneak into design documents.
>
>


More information about the Vm-dev mailing list