public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15183] New: g++ crash on input file
@ 2004-04-27 23:35 abegel at cs dot berkeley dot edu
  2004-04-27 23:38 ` [Bug c++/15183] " abegel at cs dot berkeley dot edu
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-04-27 23:35 UTC (permalink / raw)
  To: gcc-bugs

Running g++ on the attached preprocessed C++ source file causes g++ to crash with an 

g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

We compiled our own gcc 3.3.2.

Reading specs from /usr/misc/pkg/gcc-3.3.2/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix=/usr/misc/pkg/gcc-3.3.2 --enable-shared --with-
gnu-as --with-as=/usr/misc/bin/as --with-gnu-ld --with-ld=/usr/misc/bin/ld --enable-threads --
enable-languages=c,c++
Thread model: posix
gcc version 3.3.2

Running on Linux acacia.CS.Berkeley.EDU 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 
i686 i386 GNU/Linux. Fedora distribution 9.

Command line used to invoke compiler:

/usr/misc/pkg/gcc-3.3.2/bin/g++ -c -fPIC -O3  -Wchar-subscripts -Wcomment -Wformat -Wimplicit 
-Wmultichar -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -W -Wpointer-arith -Wwrite-strings 
-Wconversion -Wsign-compare -Wdeprecated -Woverloaded-virtual -o c.def.o c.def.ii

-- 
           Summary: g++ crash on input file
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: abegel at cs dot berkeley dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
@ 2004-04-27 23:38 ` abegel at cs dot berkeley dot edu
  2004-04-27 23:42 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-04-27 23:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-04-27 23:05 -------
Created an attachment (id=6178)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6178&action=view)
Preprocessed C++ Source code that crashes g++


-- 


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
  2004-04-27 23:38 ` [Bug c++/15183] " abegel at cs dot berkeley dot edu
@ 2004-04-27 23:42 ` pinskia at gcc dot gnu dot org
  2004-04-30 15:03 ` reichelt at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-27 23:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-27 23:18 -------
There is a memory hog here but 3.4.0 and 3.5.0 ICE on this code (after fixing the libstdc++ 
preprocessed part of the code).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, memory-
                   |                            |hog


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
  2004-04-27 23:38 ` [Bug c++/15183] " abegel at cs dot berkeley dot edu
  2004-04-27 23:42 ` pinskia at gcc dot gnu dot org
@ 2004-04-30 15:03 ` reichelt at gcc dot gnu dot org
  2004-04-30 15:20 ` reichelt at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-04-30 15:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-04-30 14:44 -------
* Concerning the ICE in 3.4.0 and mainline, that Andrew mentioned:

  The code is actually invalid, since it tries to define the function

    template<class T>
    void VFixedLen<T>::DifferentialTmp::serialize_type(XMLWriter &)

  in line 49678, but there's no class DifferentialTmp in VFixedLen.
  Alas 3.4.0 and mainline ICE in this situation.

  Here's a short testcase to illustrate this:

  =============================================
  template<typename> struct A {};

  template<typename T> void A<T>::B::foo() {}
  =============================================

  GCC 2.95.3 correctly rejects the code,
  gcc 3.1 - 3.3.4 wrongly accept it,
  gcc 3.0.x, 3.4.0 and mainline segfault.

  Since this has almost nothing to do with the original bug report,
  I'll open a new PR for this.

* Concerning the compiler-crash/memory-hog in 3.3.2:

  The memory consumption is about 560 MB at "-O3" for gcc 3.3.x.
  If you have less memory available, the compiler crashes as seen
  above. So the crash is not a bug per se.

  The question is: Is 560 MB an inappropriate amount of memory for this
  program? Given that you use "-O3" and that the source file is about
  5.3 MB, this is hardly a bug. Given the release policies for the
  3.3.x release series, this won't get fixed in gcc 3.3.x.

  Since the code is buggy, it's not well suited as a testcase for
  gcc 3.4.0 and newer. So I'm closing this PR for good.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|ice-on-valid-code           |
         Resolution|                            |WONTFIX


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (2 preceding siblings ...)
  2004-04-30 15:03 ` reichelt at gcc dot gnu dot org
@ 2004-04-30 15:20 ` reichelt at gcc dot gnu dot org
  2004-04-30 16:29 ` abegel at cs dot berkeley dot edu
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-04-30 15:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-04-30 14:50 -------
The new PR to track the ICE is PR 15227.


-- 


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (3 preceding siblings ...)
  2004-04-30 15:20 ` reichelt at gcc dot gnu dot org
@ 2004-04-30 16:29 ` abegel at cs dot berkeley dot edu
  2004-04-30 19:55 ` abegel at cs dot berkeley dot edu
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-04-30 16:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-04-30 16:17 -------
Perhaps you missed it wading through the quite excessive megabytes of code here, but *struct* 
VDifferential::DifferentialTmp is defined on line 38976. The prototype for the serialize_type() method in 
question is on 39021.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (4 preceding siblings ...)
  2004-04-30 16:29 ` abegel at cs dot berkeley dot edu
@ 2004-04-30 19:55 ` abegel at cs dot berkeley dot edu
  2004-04-30 20:04 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-04-30 19:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-04-30 19:10 -------
Sorry, my bad. You guys were right. There's an error in our code. DifferentialTmp is defined in 
VDifferential<T>, not in VFixedLen<T>. Looks like a "spelling" mistake.  I'll fix it and see if I can 
reproduce the crash.

-- 


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (5 preceding siblings ...)
  2004-04-30 19:55 ` abegel at cs dot berkeley dot edu
@ 2004-04-30 20:04 ` pinskia at gcc dot gnu dot org
  2004-04-30 21:05 ` abegel at cs dot berkeley dot edu
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-30 20:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-30 19:15 -------
So closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (6 preceding siblings ...)
  2004-04-30 20:04 ` pinskia at gcc dot gnu dot org
@ 2004-04-30 21:05 ` abegel at cs dot berkeley dot edu
  2004-05-01 18:16 ` abegel at cs dot berkeley dot edu
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-04-30 21:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-04-30 20:22 -------
My bug-fixed C++ code still causes a crash. Before I resubmit it and have you look at it again, can you 
tell me the debugging/tracing technique you used to find the program flaw in the preprocessed code? I 
can weed out anymore of these that I might find. Thanks.

-- 


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (7 preceding siblings ...)
  2004-04-30 21:05 ` abegel at cs dot berkeley dot edu
@ 2004-05-01 18:16 ` abegel at cs dot berkeley dot edu
  2004-05-14 14:55 ` abegel at cs dot berkeley dot edu
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-05-01 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-05-01 18:16 -------
Let's try it again. 

BTW, in the earlier comments  s/pinskia/Volker Reichelt/,g. ;)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (8 preceding siblings ...)
  2004-05-01 18:16 ` abegel at cs dot berkeley dot edu
@ 2004-05-14 14:55 ` abegel at cs dot berkeley dot edu
  2004-05-14 14:58 ` abegel at cs dot berkeley dot edu
  2004-08-09 21:25 ` reichelt at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-05-14 14:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-05-13 21:13 -------
Created an attachment (id=6275)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6275&action=view)
Preprocessed C++ source code that crashes g++

This preprocessed code has one more class declaration at the end of the file
than c.def.works.ii. The class has nothing special in it, but indicates there's
probably some sort of overflow problem that is crashing g++.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #6207 is|0                           |1
           obsolete|                            |


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (9 preceding siblings ...)
  2004-05-14 14:55 ` abegel at cs dot berkeley dot edu
@ 2004-05-14 14:58 ` abegel at cs dot berkeley dot edu
  2004-08-09 21:25 ` reichelt at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: abegel at cs dot berkeley dot edu @ 2004-05-14 14:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From abegel at cs dot berkeley dot edu  2004-05-13 21:15 -------
Created an attachment (id=6276)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6276&action=view)
Preprocessed C++ source code that does not crash g++

This preprocessed C++ source code does not crash g++. It is almost identical to
c.def.breaks.ii but for the deletion of the last class declaration in
c.def.breaks.ii. 

-- 


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


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

* [Bug c++/15183] g++ crash on input file
  2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
                   ` (10 preceding siblings ...)
  2004-05-14 14:58 ` abegel at cs dot berkeley dot edu
@ 2004-08-09 21:25 ` reichelt at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-09 21:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-09 21:25 -------
The second bullet of comment #4 still applies:
g++ uses lots of memory, but doesn't crash if you provide enough memory.
This won't get fixed in gcc 3.3.x.

The small difference between c.def.breaks.ii and c.def.works.ii seems to
just put you over the edge (memory-wise). Just try to increase your
swap-space or compile with less optimization.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2004-08-09 21:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 23:35 [Bug c++/15183] New: g++ crash on input file abegel at cs dot berkeley dot edu
2004-04-27 23:38 ` [Bug c++/15183] " abegel at cs dot berkeley dot edu
2004-04-27 23:42 ` pinskia at gcc dot gnu dot org
2004-04-30 15:03 ` reichelt at gcc dot gnu dot org
2004-04-30 15:20 ` reichelt at gcc dot gnu dot org
2004-04-30 16:29 ` abegel at cs dot berkeley dot edu
2004-04-30 19:55 ` abegel at cs dot berkeley dot edu
2004-04-30 20:04 ` pinskia at gcc dot gnu dot org
2004-04-30 21:05 ` abegel at cs dot berkeley dot edu
2004-05-01 18:16 ` abegel at cs dot berkeley dot edu
2004-05-14 14:55 ` abegel at cs dot berkeley dot edu
2004-05-14 14:58 ` abegel at cs dot berkeley dot edu
2004-08-09 21:25 ` 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).