stack overflow

Godmar Back gback@cs.utah.edu
Mon Nov 1 11:04:00 GMT 1999


> 
> Godmar Back <gback@cs.utah.edu> writes:
> 
> > I would really like to learn just how you do this.
> > You said something about the gcc implementation: do you have any pointers?
> 
> Use the Source.  The option is -fstack-check.  You will find the
> variable flag_stack_check defined in gcc/toplev.c.  Grep for that.
> (Also check the config directory and its sub-directories.)
> 

Thanks, but this is not what I mean.  I'm looking for the code that
catches the stack overflow and recovers from it, for instance by
throwing a StackOverflowError (in Java).  I would expect such code
to live in a run-time library, not necessarily in the compiler (?).

> > Is this part of any of the runtime libraries accompanying gcc?
> 
> Not as far as I know, but I did not do this work.

If it's not part of any run-time library that comes with gcc, was it maybe 
some proprietary work Cygnus did for a specific customer?
Or, which is what I'm starting to suspect, maybe you were only concerned 
with aborting on a stack overflow and not with recovering from it,
as is necessary in Java?

	- Godmar



More information about the Java mailing list