Runtime bug? and other questions
Daniel Wang
danwang@cs.princeton.edu
26 Jan 2000 15:28:42 -0500
"Stephen Weeks" <sweeks@intertrust.com> writes:
> > Hmm looks like the bug is still there.... but only manifests itself when I
> > *don't* compile with -DGC_EVERY_CHECK
>
> Found the bug. I've appended the fixed gc.c to the end of this
> message. The problem was due to the stack resizing code in forward.
> When the stack was grown, the entire new stack size bytes were copied
> from fromSpace instead of just copying the part of the stack that was
> used. The new code only copies the used part of the stack and bumps
> the back of the queue in toSpace by a "skip" amount (which is only
> nonzero for stacks). Your example now works. Lemme know if there are
> more problems. Doubtless this are, since this runtime is so
> untested.
Seems to work now for a few slightly harder tests. BTW what does the GC do
when it finds a pointer to an object outside of the fromspace? The SML/NJ
runtime would just leave these objects alone. (i.e. not trace or forward
them). Can MLton be made to behave the same way?