This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GC stack overflow on mainline


> Importance: Normal
> Sensitivity: 
> Cc: gcc@gcc.gnu.org
> From: "Ulrich Weigand" <Ulrich.Weigand@de.ibm.com>
> Date: Tue, 10 Sep 2002 19:08:02 +0200
> X-MIMETrack: Serialize by Router on D12ML028/12/M/IBM(Release 5.0.9a |January 7, 2002) at
>  10/09/2002 19:08:04
> X-OriginalArrivalTime: 10 Sep 2002 17:08:08.0922 (UTC) FILETIME=[A2F3FBA0:01C258EC]
> 
> 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?

It could be.  The changes are quite extensive, though.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]