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 middle-end/15677] New: [3.3.3 regression] ICE during GC in ggc_set_mark


2004-04-24  Richard Henderson  <rth@redhat.com>

	PR bootstrap/14671
        * alias.c (alias_invariant, alias_invariant_size): Mark GTY.
        (reg_known_value, reg_known_value_size): Likewise; make static.
        (reg_known_equiv_p): Make static.
        (clear_reg_alias_info): Update for new indexing.
        (get_reg_known_value, set_reg_known_value): New.
        (get_reg_known_equiv_p, set_reg_known_equiv_p): New.
        (canon_rtx): Use them. 
        (init_alias_analysis): Likewise.  Allocate reg_known_value with gc.
        Don't play queer offsetting games with reg_known_value and
        reg_known_equiv_p.
        (end_alias_analysis): Don't free reg_known_value.
        * rtl.h (get_reg_known_value, get_reg_known_equiv_p): Declare.
        * sched-deps.c (reg_known_equiv_p, reg_known_value): Remove.
        (deps_may_trap_p, sched_analyze_1, sched_analyze_2): Use the new
        functions instead.

Causes the testcase at
http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/gmp_test4.ii.gz

to ICE with

Program received signal SIGSEGV, Segmentation fault.
0x0827c3e5 in ggc_set_mark (p=0x94d8988) at
/home/rguenth/src/gcc/gcc3.3/gcc/ggc-page.c:525
525       L2 = LOOKUP_L2 (p);
(gdb) bt
#0  0x0827c3e5 in ggc_set_mark (p=0x94d8988) at
/home/rguenth/src/gcc/gcc3.3/gcc/ggc-page.c:525
#1  0x083382b0 in gt_ggc_r_gt_alias_h ()
#2  0x080dcc14 in gt_ggc_ma_alias_invariant (x_p=0x9) at gt-alias.h:47
#3  0x081612c7 in ggc_mark_roots () at
/home/rguenth/src/gcc/gcc3.3/gcc/ggc-common.c:124
#4  0x0827ca75 in ggc_collect () at
/home/rguenth/src/gcc/gcc3.3/gcc/ggc-page.c:1727
#5  0x081eaa4b in loop_optimize (f=0x4fcf470c, dumpfile=0x0, flags=1)
    at /home/rguenth/src/gcc/gcc3.3/gcc/loop.c:558
#6  0x08263cba in rest_of_compilation (decl=0x469e77e0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/toplev.c:2947
#7  0x080b908e in genrtl_finish_function (fn=0x469e77e0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/cp/semantics.c:2589
#8  0x080b8dbd in expand_body (fn=0x469e77e0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/cp/semantics.c:2412
#9  0x08077688 in instantiate_decl (d=0x0, defer_ok=0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/cp/pt.c:10578
#10 0x080779d0 in instantiate_pending_templates ()
    at /home/rguenth/src/gcc/gcc3.3/gcc/cp/pt.c:10655
#11 0x08087abf in finish_file () at
/home/rguenth/src/gcc/gcc3.3/gcc/cp/decl2.c:2807
#12 0x08091dac in yyparse () at parse.y:489
#13 0x080d36e9 in c_common_parse_file (set_yydebug=0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/c-lex.c:159
#14 0x08261f9a in compile_file () at
/home/rguenth/src/gcc/gcc3.3/gcc/toplev.c:2130
#15 0x08267127 in do_compile () at
/home/rguenth/src/gcc/gcc3.3/gcc/toplev.c:5414
#16 0x082671bb in toplev_main (argc=0, argv=0x0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/toplev.c:5444
#17 0x080d93cb in main (argc=0, argv=0x0) at
/home/rguenth/src/gcc/gcc3.3/gcc/main.c:35
#18 0x4003b8ae in __libc_start_main () from /lib/libc.so.6
(gdb) up 5
#5  0x081eaa4b in loop_optimize (f=0x4fcf470c, dumpfile=0x0, flags=1)
    at /home/rguenth/src/gcc/gcc3.3/gcc/loop.c:558
558               ggc_collect ();
(gdb) list
553           struct loop *loop = &loops->array[i];
554
555           if (! loop->invalid && loop->end)
556             {
557               scan_loop (loop, flags);
558               ggc_collect ();
559             }
560         }
561
562       end_alias_analysis ();
(gdb) up 3
#8  0x080b8dbd in expand_body (fn=0x469e77e0)
    at /home/rguenth/src/gcc/gcc3.3/gcc/cp/semantics.c:2412
2412      genrtl_finish_function (fn);
(gdb) debug_tree(fn)
Undefined command: "debug".  Try "help".
(gdb) call debug_tree(fn)
 <function_decl 0x469e77e0 calcGCFillList
    type <method_type 0x469dc1c0
        type <void_type 0x4016ac40 void asm_written type_6 VOID
            align 8 symtab 0 alias set -1
            pointer_to_this <pointer_type 0x4016acb0>>
        DI
        size <integer_cst 0x4015d920 constant 64>
        unit size <integer_cst 0x4015db40 constant 8>
        align 64 symtab 0 alias set -1 method basetype <record_type
0x46853e00 GridLayoutData<2>>
        arg-types <tree_list 0x469dbed8 side-effects value <pointer_type
0x46853ee0>
            chain <tree_list 0x4015ef64 tree_2 value <void_type 0x4016ac40
void>>>
        pointer_to_this <pointer_type 0x47adbd20>>
    addressable asm_written used public private static weak decl_1 decl_5
QI file
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp line
350 context <record_type 0x46853e00 GridLayoutData<2>>
    arguments <parm_decl 0x4fb531c0 this
        type <pointer_type 0x46a45a10 type <record_type 0x46853e00
GridLayoutData<2>>
            readonly unsigned SI
            size <integer_cst 0x4015dba0 constant 32>
            unit size <integer_cst 0x4015dc00 constant 4>
            align 32 symtab 152330360 alias set -1>
        readonly unsigned used SI file
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp line
350 size <integer_cst 0x4015dba0 32> unit size <integer_cst 0x4015dc00 4>
        align 32 context <function_decl 0x469e77e0 calcGCFillList> initial
<pointer_type 0x46a45a10>
        (reg/v/u/f:SI 58) arg-type <pointer_type 0x46a45a10>
        incoming-rtl (mem/u/f:SI (reg/f:SI 16 argp) [116 this+0 S4 A32])>
    result <result_decl 0x4fb53230 type <void_type 0x4016ac40 void>
        VOID file
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp line
350
        align 8 context <function_decl 0x469e77e0 calcGCFillList>> initial
<block 0x4f7a4ef4>
    template-info 0x469e8438
    (mem:QI (symbol_ref/i:SI
("_ZN14GridLayoutDataILi2EE14calcGCFillListEv")) [0 S1 A8]) chain
<function_decl 0x469e7930 calcDomains>>
(gdb) c
Continuing.
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp: In
   member function `void GridLayoutData<Dim>::calcGCFillList() [with int
Dim =
   2]':
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp:201:
instantiated from `void GridLayoutData<Dim>::initialize(const
Interval<Dim>&, const Partitioner&, const ContextMapper<Dim>&) [with
Partitioner = GridPartition<2>, int Dim = 2]'
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp:96:
instantiated from `GridLayoutData<Dim>::GridLayoutData(const
Interval<Dim>&, const Partitioner&, const ContextMapper<Dim>&) [with
Partitioner = GridPartition<2>, int Dim = 2]'
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp:1428:
instantiated from `GridLayout<Dim>::GridLayout(typename
GridLayoutData<Dim>::Domain_t&, const Partitioner&, const ReplicatedTag&)
[with Partitioner = GridPartition<2>, int Dim = 2]'
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Engine/tests/gmp_test4.cpp:103:
instantiated from here
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Layout/GridLayout.cpp:484:
internal compiler error: Segmentation
   fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


Reverting the cited patch fixes the problem.  This is a regression towards
before the patch (i.e. 3.3.3 respectively).

-- 
           Summary: [3.3.3 regression] ICE during GC in ggc_set_mark
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
                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=15677


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