Re: Garbage collection, part two...

From: Felix Lee <>
Date: Thu, 20 Apr 2000 23:40:51 -0700

Erick Gallesio <>:
> > In ANSI C, setjmp/longjmp is not required to restore any
> > local variables, and thus is not required to save any
> > registers.
> >
> > 'gcc -traditional' will force local variables to be
> > allocated on the stack by default, thus giving you pre-ANSI
> > setjmp/longjmp behavior.
> Thanks for the information. I have not seen it before (I have just
> checked the gcc info file now).
> Do you know if this is recent because, STk is compiled with gcc for
> years and I have not seen the problem so far. I know that I'm mainly
> on i386, which has very few registers, and it can explain, but others
> have not signalled this kind of problem. Weird....

It's not recent. volatile and the ANSI C semantics
setjmp/longjmp have been around for a decade now, and I
think gcc has had it implemented about that long. volatile
caused all sorts of problems when it was invented.

You may have just been lucky. It's a hard bug to trigger.
In a short interval, you need to have
 1. a gc
 2. enough allocation to overwrite a particular live value
    that was inadvertently gc'ed.
Received on Fri Apr 21 2000 - 08:41:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST