public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43600]  New: Segmentation fault for large C file (24MB)
@ 2010-03-31 11:56 ihusar at fit dot vutbr dot cz
  2010-03-31 11:57 ` [Bug c/43600] " ihusar at fit dot vutbr dot cz
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ihusar at fit dot vutbr dot cz @ 2010-03-31 11:56 UTC (permalink / raw)
  To: gcc-bugs

For my generated C file that has 24MB, gcc fails after 11 seconds 
with:

gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.

Fedora 11 64-bit, Pentium Quad Core, 2.83GHz, 4GB memory,
gcc 4.4.1

$ uname -a
Linux 2.6.30.9-99.fc11.x86_64 #1 SMP Tue Nov 17 21:30:38 EST 2009 x86_64 x86_64
x86_64 GNU/Linux

Source file and valgrind report are added as attachment.


-- 
           Summary: Segmentation fault for large C file (24MB)
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ihusar at fit dot vutbr dot cz
  GCC host triplet: x86_64-linux-gnu


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
@ 2010-03-31 11:57 ` ihusar at fit dot vutbr dot cz
  2010-03-31 11:58 ` ihusar at fit dot vutbr dot cz
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ihusar at fit dot vutbr dot cz @ 2010-03-31 11:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ihusar at fit dot vutbr dot cz  2010-03-31 11:57 -------
Created an attachment (id=20263)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20263&action=view)
testing C file


-- 


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
  2010-03-31 11:57 ` [Bug c/43600] " ihusar at fit dot vutbr dot cz
@ 2010-03-31 11:58 ` ihusar at fit dot vutbr dot cz
  2010-03-31 11:59 ` ihusar at fit dot vutbr dot cz
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ihusar at fit dot vutbr dot cz @ 2010-03-31 11:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ihusar at fit dot vutbr dot cz  2010-03-31 11:57 -------
Created an attachment (id=20264)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20264&action=view)
valgrind report


-- 


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
  2010-03-31 11:57 ` [Bug c/43600] " ihusar at fit dot vutbr dot cz
  2010-03-31 11:58 ` ihusar at fit dot vutbr dot cz
@ 2010-03-31 11:59 ` ihusar at fit dot vutbr dot cz
  2010-03-31 12:24 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ihusar at fit dot vutbr dot cz @ 2010-03-31 11:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ihusar at fit dot vutbr dot cz  2010-03-31 11:59 -------
Other details, e.g. why I want to compile so huge file, can be found here:
http://n3.nabble.com/Memory-and-time-consumption-for-larger-files-td683717.html#a683717


-- 


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
                   ` (2 preceding siblings ...)
  2010-03-31 11:59 ` ihusar at fit dot vutbr dot cz
@ 2010-03-31 12:24 ` rguenth at gcc dot gnu dot org
  2010-03-31 13:20 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-31 12:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-03-31 12:23 -------
needs -DCLANG to build.  cgraph verification takes ages, so make sure to
turn off checking.  The issue is:

Program received signal SIGSEGV, Segmentation fault.
0x00000000007b9f6e in cgraph_output_in_order ()
    at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cgraphunit.c:1148
1148      memset (nodes, 0, size);
(gdb) p size
$1 = 13406704
(gdb) l
1143      struct cgraph_asm_node *pa;
1144
1145      max = cgraph_order;
1146      size = max * sizeof (struct cgraph_order_sort);
1147      nodes = (struct cgraph_order_sort *) alloca (size);
1148      memset (nodes, 0, size);
1149
1150      varpool_analyze_pending_decls ();
1151
1152      for (pf = cgraph_nodes; pf; pf = pf->next)

well.  We shouldn't try to allocate so much memory on stack.

Mine.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.2 4.4.3 4.4.4
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-31 12:23:51
               date|                            |


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
                   ` (3 preceding siblings ...)
  2010-03-31 12:24 ` rguenth at gcc dot gnu dot org
@ 2010-03-31 13:20 ` rguenth at gcc dot gnu dot org
  2010-03-31 13:24 ` rguenth at gcc dot gnu dot org
  2010-03-31 13:25 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-31 13:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-03-31 13:20 -------
Subject: Bug 43600

Author: rguenth
Date: Wed Mar 31 13:20:19 2010
New Revision: 157867

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157867
Log:
2010-03-31  Richard Guenther  <rguenther@suse.de>

        PR middle-end/43600
        * cgraphunit.c (cgraph_output_in_order): Do not allocate
        temporary data on stack.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraphunit.c


-- 


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
                   ` (4 preceding siblings ...)
  2010-03-31 13:20 ` rguenth at gcc dot gnu dot org
@ 2010-03-31 13:24 ` rguenth at gcc dot gnu dot org
  2010-03-31 13:25 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-31 13:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-03-31 13:23 -------
Subject: Bug 43600

Author: rguenth
Date: Wed Mar 31 13:23:17 2010
New Revision: 157868

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157868
Log:
2010-03-31  Richard Guenther  <rguenther@suse.de>

        PR middle-end/43600
        * cgraphunit.c (cgraph_output_in_order): Do not allocate
        temporary data on stack.

Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/cgraphunit.c


-- 


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


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

* [Bug c/43600] Segmentation fault for large C file (24MB)
  2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
                   ` (5 preceding siblings ...)
  2010-03-31 13:24 ` rguenth at gcc dot gnu dot org
@ 2010-03-31 13:25 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-31 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-03-31 13:25 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.4.2 4.4.3 4.4.4           |4.4.2 4.4.3
      Known to work|                            |4.3.4 4.4.4 4.5.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.4


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


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

end of thread, other threads:[~2010-03-31 13:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 11:56 [Bug c/43600] New: Segmentation fault for large C file (24MB) ihusar at fit dot vutbr dot cz
2010-03-31 11:57 ` [Bug c/43600] " ihusar at fit dot vutbr dot cz
2010-03-31 11:58 ` ihusar at fit dot vutbr dot cz
2010-03-31 11:59 ` ihusar at fit dot vutbr dot cz
2010-03-31 12:24 ` rguenth at gcc dot gnu dot org
2010-03-31 13:20 ` rguenth at gcc dot gnu dot org
2010-03-31 13:24 ` rguenth at gcc dot gnu dot org
2010-03-31 13:25 ` rguenth 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).