From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461) Description of problem: gcc: Internal error: Terminated (program cpp0) Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. I'm generating a really large file that contains nothing but #ifdef #endif blocks, and piping that to gcc -E - Eventually gcc dies. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a file with the pattern: #ifdef macro char foo[] = "macro" = macro; #endif 2. Where macro is a random macro. 3. Make sure the file is at least 260 000 000 bytes big. 4. cat file | gcc -E - > results 5. gcc shuts down Actual Results: The error text is the first 3 lines of the Description. Expected Results: gcc should preprocess the whole file without shutting down, since the file isn't #defining any new macros, just lots of queries about the current state of the macro table. Additional info: Uh, well, the system this happens on is actually an SuSE Pro 7.2, but the gcc error text says to report it here. # uname -a Linux moll 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown # gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
If I've interpreted your problem description properly, this is the preprocessor consuming all memory and then dying. This still happens with current gcc, and in fact has gotten worse after gcc 3.2. Pushed upstream to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17798
Yes, it looked like a memory leak in the preprocessor.