Summary: | [3.3 regression] Infinite memory usage after syntax error | ||
---|---|---|---|
Product: | gcc | Reporter: | Falk Hueffner <falk> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | gcc-bugs, vladimir |
Priority: | P2 | Keywords: | error-recovery, ice-on-invalid-code |
Version: | 3.3 | ||
Target Milestone: | 3.3.1 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2003-06-22 17:09:04 | |
Attachments: | Preprocessed file which triggers infinite memory usage. |
Description
Falk Hueffner
2003-06-22 12:06:40 UTC
Confirmed. GCC 3.3 stucks forever with the given code. I've just run into very similiar problem. The code with cause 3.2 to produce error message, causes 3.3 to eat all virtual memory. g++ version is: Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux Thread model: posix gcc version 3.3 (Debian) The complete command was: g++-3.3 -save-temps -x c++ -Wall -ftemplate-depth-100 -O0 -fno-inline -g -DDEBUG_CFG -I"." -I".." -I"../../lib" -I"../../lib/nstl" -I"../cpp_mark" -I"/space/NM/boost" -I"/space/NM/boost-sandbox" -I"bin/gcc/debug/main-target-nm_asm_analysis" -I"bin/gcc/debug/main-target-nm_asm" -I"../cpp_mark/bin/gcc/debug/main-target-cpp_lite" -I"bin/gcc/debug" -I"../cpp_mark/bin/gcc/debug" -c -o "bin/gcc/debug/main-target-nm_asm_analysis/instruction_instance.o" "xxx.cpp" virtual memory exhausted: Cannot allocate memory The offending line from xxx.cpp file is visit(const Whale::NonterminalNonsense____LiteralExpression& t); where there's no such class in namespace Whale. I'm attaching the preprocessed file. Created attachment 4307 [details]
Preprocessed file which triggers infinite memory usage.
Subject: Bug 11282 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: nathan@gcc.gnu.org 2003-07-23 16:43:02 Modified files: gcc/cp : ChangeLog decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/parse: crash7.C Log message: cp: PR c++/11282 * decl.c: (reshape_init): Always advance *INITP. testsuite: PR c++/11282 * g++.dg/parse/crash7.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.185&r2=1.3076.2.186 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.965.2.56&r2=1.965.2.57 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.241&r2=1.2261.2.242 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash7.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 fixed the first bug for 3.3.1 2003-07-23 Nathan Sidwell <nathan@codesourcery.com> PR c++/11282 * decl.c: (reshape_init): Always advance *INITP. |