This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/1373] recursion stress test causes segmentation fault
- From: "bruno at clisp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2004 20:39:50 -0000
- Subject: [Bug libgcj/1373] recursion stress test causes segmentation fault
- References: <20001220121922.1373.osk@hem.passagen.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bruno at clisp dot org 2004-01-08 20:39 -------
> One way of fixing this having a signal catcher for SIGSEGV but from the
glibc's signal
> man page:
> According to POSIX, the behaviour of a process is undefined after it ignores a
SIGFPE,
> SIGILL, or SIGSEGV signal that was not generated by the kill(2) or the
raise(3) functions.
This is not very relevant, because in practice, using the proper cautions,
catching SIGSEGV coming from a stack overflow works fine. GNU libsigsegv
provides the functionality, and GNU clisp and GNU smalltalk use it. It works on
Linux, OSF/1, FreeBSD, OpenBSD, NetBSD/Alpha, MacOS X, Solaris, HP-UX/HPPA,
IRIX, AIX 4, BeOS, Cygwin, Windows. The only tricky point in using it would be
the necessity to extend the stack by a few pages in order to be able to throw
the StackOverflowException. Or to throw this exception from within the signal
stack. Either of these would be challenging.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1373