public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error
@ 2003-06-22 12:06 falk at debian dot org
  2003-06-22 17:09 ` [Bug c++/11282] " giovannibajo at libero dot it
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: falk at debian dot org @ 2003-06-22 12:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282

           Summary: [3.3 regression] Infinite memory usage after syntax
                    error
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs@gcc.gnu.org

Hi,

this was reported by Lukas Ruf (ruf at rawip org) on gcc-bugs 29 May 2003,
however I can't find it in the database (or even in the list archive...?).

Test case:

struct parameter_struct_t {
  char short_option;
  char *long_option;
};

parameter_struct_t *parameters[] = {
  {
    'f';
    "from";
  };
};

% g++ --version
g++ (GCC) 3.3.1 20030619 (prerelease)
% g++ -c away.cc
away.cc:8: error: syntax error before `;' token
[killed because out of memory]

mainline says:

away.cc:8: error: expected `}'
away.cc:8: error: expected `}'
away.cc:8: error: brace-enclosed initializer used to initialize `
   parameter_struct_t*'
away.cc:9: error: expected unqualified-id
away.cc:9: error: expected `,' or `;'
away.cc:10: error: expected declaration


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
@ 2003-06-22 17:09 ` giovannibajo at libero dot it
  2003-06-30 10:14 ` ghost at cs dot msu dot su
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-22 17:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282


giovannibajo at libero dot it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-22 17:09:04
               date|                            |


------- Additional Comments From giovannibajo at libero dot it  2003-06-22 17:09 -------
Confirmed. GCC 3.3 stucks forever with the given code.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
  2003-06-22 17:09 ` [Bug c++/11282] " giovannibajo at libero dot it
@ 2003-06-30 10:14 ` ghost at cs dot msu dot su
  2003-07-23 13:05 ` nathan at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ghost at cs dot msu dot su @ 2003-06-30 10:14 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282



------- Additional Comments From ghost at cs dot msu dot su  2003-06-30 10:14 -------
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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
  2003-06-22 17:09 ` [Bug c++/11282] " giovannibajo at libero dot it
  2003-06-30 10:14 ` ghost at cs dot msu dot su
@ 2003-07-23 13:05 ` nathan at gcc dot gnu dot org
  2003-07-23 16:43 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-07-23 13:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282


nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
                   ` (2 preceding siblings ...)
  2003-07-23 13:05 ` nathan at gcc dot gnu dot org
@ 2003-07-23 16:43 ` cvs-commit at gcc dot gnu dot org
  2003-07-23 16:47 ` nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-23 16:43 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-23 16:43 -------
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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
                   ` (3 preceding siblings ...)
  2003-07-23 16:43 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-23 16:47 ` nathan at gcc dot gnu dot org
  2003-10-30  6:05 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-07-23 16:47 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282



------- Additional Comments From nathan at gcc dot gnu dot org  2003-07-23 16:47 -------
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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
                   ` (4 preceding siblings ...)
  2003-07-23 16:47 ` nathan at gcc dot gnu dot org
@ 2003-10-30  6:05 ` pinskia at gcc dot gnu dot org
  2003-10-30  8:58 ` nathan at gcc dot gnu dot org
  2003-12-08  2:47 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-30  6:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |3.3.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
                   ` (5 preceding siblings ...)
  2003-10-30  6:05 ` pinskia at gcc dot gnu dot org
@ 2003-10-30  8:58 ` nathan at gcc dot gnu dot org
  2003-12-08  2:47 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-10-30  8:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282


nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|nathan at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11282] [3.3 regression] Infinite memory usage after syntax error
  2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
                   ` (6 preceding siblings ...)
  2003-10-30  8:58 ` nathan at gcc dot gnu dot org
@ 2003-12-08  2:47 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-12-08  2:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-12-08 02:47 -------
Since the first bug was fixed for gcc 3.3.1, I'm closing the PR.
I opened another problem report, namely PR 13349, for the unrelated
second bug.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.3.3                       |3.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11282


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-12-08  2:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 12:06 [Bug c++/11282] New: [3.3 regression] Infinite memory usage after syntax error falk at debian dot org
2003-06-22 17:09 ` [Bug c++/11282] " giovannibajo at libero dot it
2003-06-30 10:14 ` ghost at cs dot msu dot su
2003-07-23 13:05 ` nathan at gcc dot gnu dot org
2003-07-23 16:43 ` cvs-commit at gcc dot gnu dot org
2003-07-23 16:47 ` nathan at gcc dot gnu dot org
2003-10-30  6:05 ` pinskia at gcc dot gnu dot org
2003-10-30  8:58 ` nathan at gcc dot gnu dot org
2003-12-08  2:47 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).