This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: stack overflow
- To: per at bothner dot com (Per Bothner)
- Subject: Re: stack overflow
- From: Godmar Back <gback at cs dot utah dot edu>
- Date: Mon, 1 Nov 1999 12:04:14 -0700 (MST)
- Cc: java-discuss at sourceware dot cygnus dot com
>
> 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