This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GC stack overflow on mainline
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: geoffk at geoffk dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 10 Sep 2002 19:08:02 +0200
- Subject: GC stack overflow on mainline
- Sensitivity:
Hello Geoff,
I've just tracked down a cc1 crash when compiling the GB18030 iconv
converter from glibc on s390x-ibm-linux to a stack overflow inside
the garbage collection machinery.
The problem is that the source file contains a statically initialized
array with a huge initializer list (several 10000 entries). This gets
parsed into a tree with correspondingly large recursion along the
tree->chain field, causing a correspondingly deep recursion of the
gt_ggc_mx_lang_tree_node function when marking that tree.
As (caused in part by the s390x ABI) every call frame takes about
200 bytes of stack, this causes the default Linux stack (8 MB)
to overflow. With 16 MB stack the file compiles fine.
I've noticed you have fixed the problem of deep recursion on the
PCH branch. Do you think this fix could be backported to mainline?
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com