This is the mail archive of the gcc-bugs@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: long function name


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



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