long function name
Jim Wilson
wilson@specifix.com
Wed Nov 30 03:20:00 GMT 2005
Kornel wrote:
> 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
More information about the Gcc-bugs
mailing list