This is the mail archive of the
mailing list for the GCC project.
Re: long function name
- From: Jim Wilson <wilson at specifix dot com>
- To: Kornel <kornel dot mail at gmail dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Nov 2005 19:20:09 -0800
- Subject: Re: long function name
- References: <firstname.lastname@example.org>
g++ crashes for a very long function name ;)
Bugs should be filed into bugzilla, rather than mailed to the gcc-bugs
list. We won't track bugs mailed to the list.
I took a quick look. I couldn't reproduce on my system. However, it
occured to me that gcc is probably trying to copy function names into
buffers on the stack. An 8MB function name means you need more than 8MB
of stack space to compile it. Experimenting, I can compile the file
with 16MB of stack space, but I can reproduce your error if I have only
8MB of stack space.
Since stack space restriction is an OS limit, there isn't much gcc can
do about it, except to ask you to increase it or reduce your function
name length. It isn't reasonable to rewrite code to reduce stack space
for this example. If you are using bash, try "ulimit -s unlimited". If
there is a per user system specified stack space limit, then you might
need root access to increase it past this limit.
Jim Wilson, GNU Tools Support, http://www.specifix.com