This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/43600] Segmentation fault for large C file (24MB)



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]