/test/gnu/gcc/objdir/./prev-gcc/xgcc -B/test/gnu/gcc/objdir/./prev-gcc/
-B/opt/g
nu64/gcc/gcc-4.5.0/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-4.5.0/hppa64-hp
-hpux11.11/bin/ -B/opt/gnu64/gcc/gcc-4.5.0/hppa64-hp-hpux11.11/lib/ -isystem
/op
t/gnu64/gcc/gcc-4.5.0/hppa64-hp-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-4.
5.0/hppa64-hp-hpux11.11/sys-include    -c  -g -O2 -DIN_GCC   -W -Wall
-Wwrite-st
rings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attr
ibute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wer
ror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I.
-I.
./../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include
-I../../gcc/gcc/../lib
cpp/include -I/opt/gnu64/gcc/gcc-4.5.0/include  -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber    ../../gcc/gcc/cse.c -o
cse.o
../../gcc/gcc/cse.c: In function 'canon_reg':
../../gcc/gcc/cse.c:2947:1: internal compiler error: Segmentation fault

Under gdb, we have:

Starting program: /test/gnu/gcc/objdir/prev-gcc/cc1 -I. -I. -I../../gcc/gcc
-I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I/opt/gnu64/gcc/gcc-4.5.0/include -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -iprefix
/test/gnu/gcc/objdir/prev-gcc/../lib/gcc/hppa64-hp-hpux11.11/4.5.0/ -isystem
/test/gnu/gcc/objdir/./prev-gcc/include -isystem
/test/gnu/gcc/objdir/./prev-gcc/include-fixed -DIN_GCC -DHAVE_CONFIG_H -isystem
/opt/gnu64/gcc/gcc-4.5.0/hppa64-hp-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-4.5.0/hppa64-hp-hpux11.11/sys-include ../../gcc/gcc/cse.c 
-dumpbase cse.c -auxbase-strip cse.s -g -O2 -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -version -fno-common -o cse.s -quiet
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.
warning: Loadable segment ".tbss" outside of ELF segments
warning: Loadable segment ".tbss" outside of ELF segments
GNU C (GCC) version 4.5.0 20090905 (experimental) [trunk revision 151445]
(hppa64-hp-hpux11.11)
        compiled by GNU C version 4.3.3, GMP version 4.3.1, MPFR version 2.4.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.5.0 20090905 (experimental) [trunk revision 151445]
(hppa64-hp-hpux11.11)
        compiled by GNU C version 4.3.3, GMP version 4.3.1, MPFR version 2.4.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 902df5a7f01231b647007075d5f10e0d

Program received signal SIGSEGV, Segmentation fault.
0x4000000000a548e4 in lookup_page_table_entry (p=Cannot access memory at
address 0x0
)
    at ../../gcc/gcc/ggc-page.c:580
580       while (table->high_bits != high_bits)
(gdb) p table
$20 = (page_table) 0x0

The fault occurs in the first call to lookup_page_table_entry.
We have the following when the code first reaches line 581:

Breakpoint 5, lookup_page_table_entry (p=0x245265766973696f)
    at ../../gcc/gcc/ggc-page.c:581
581         table = table->next;
(gdb) p/x $r26
$21 = 0x8000000100345520
(gdb) p/x high_bits
$22 = 0x8000000100000000
(gdb) p/x table->high_bits
$23 = 0x800003ff00000000
(gdb) p/x table->next
$24 = 0x0

Have to think the value passed in $r26 is garbage.

Breakpoint 5, lookup_page_table_entry (p=0x245265766973696f)
    at ../../gcc/gcc/ggc-page.c:581
581         table = table->next;
(gdb) bt
#0  lookup_page_table_entry (p=0x245265766973696f)
    at ../../gcc/gcc/ggc-page.c:581
#1  0x4000000000a55f40 in ggc_set_mark (p=0x8000000100345520)
    at ../../gcc/gcc/ggc-page.c:1319
#2  0x400000000143bbc0 in gt_ggc_mx_rtx_def (x_p=0x245265766973696f)
    at gtype-desc.c:1220
#3  0x400000000143f014 in gt_ggc_mx_rtx_def (x_p=0x245265766973696f)
    at gtype-desc.c:1790
#4  0x400000000143e850 in gt_ggc_mx_rtx_def (x_p=0x245265766973696f)
    at gtype-desc.c:1709
#5  0x4000000001437318 in gt_ggc_mx_rtl_bb_info (x_p=0x245265766973696f)
    at gtype-desc.c:319
#6  0x4000000001439f68 in gt_ggc_mx_basic_block_def (x_p=0x245265766973696f)
    at gtype-desc.c:929
#7  0x4000000001437e00 in gt_ggc_mx_control_flow_graph (
    x_p=0x245265766973696f) at gtype-desc.c:450
#8  0x4000000001439450 in gt_ggc_mx_function (x_p=0x245265766973696f)
    at gtype-desc.c:788
#9  0x40000000006e2730 in gt_ggc_mx_lang_tree_node (x_p=0x245265766973696f)
    at ./gt-c-decl.h:405
#10 0x40000000006e2828 in gt_ggc_mx_lang_tree_node (x_p=0x245265766973696f)
    at ./gt-c-decl.h:412
#11 0x40000000006e2828 in gt_ggc_mx_lang_tree_node (x_p=0x245265766973696f)
---Type <return> to continue, or q <return> to quit---
    at ./gt-c-decl.h:412
#12 0x40000000006e2400 in gt_ggc_mx_lang_tree_node (x_p=0x245265766973696f)
    at ./gt-c-decl.h:388
#13 0x4000000001436d64 in gt_ggc_mx_cgraph_node (x_p=0x245265766973696f)
    at gtype-desc.c:264
#14 0x4000000001440e98 in gt_ggc_m_P11cgraph_node4htab (
    x_p=0x245265766973696f) at gtype-desc.c:2228
#15 0x4000000001292280 in ggc_mark_roots () at ../../gcc/gcc/ggc-common.c:137
#16 0x4000000000a57ba8 in ggc_collect () at ../../gcc/gcc/ggc-page.c:1944
#17 0x40000000017feb30 in execute_todo (flags=1073741824)
    at ../../gcc/gcc/passes.c:1063
#18 0x40000000017ffbe0 in execute_one_pass (pass=0x4000000000419d48)
    at ../../gcc/gcc/passes.c:1315
#19 0x40000000017ffdc4 in execute_pass_list (pass=0x245265766973696f)
    at ../../gcc/gcc/passes.c:1341
#20 0x40000000017ffe08 in execute_pass_list (pass=0x245265766973696f)
    at ../../gcc/gcc/passes.c:1342
#21 0x40000000017ffe08 in execute_pass_list (pass=0x245265766973696f)
    at ../../gcc/gcc/passes.c:1342
#22 0x400000000231a130 in tree_rest_of_compilation (fndecl=0x4000000000419d48)
    at ../../gcc/gcc/tree-optimize.c:390
#23 0x4000000003477938 in cgraph_expand_function (node=0x4000000000419d48)
    at ../../gcc/gcc/cgraphunit.c:1147
---Type <return> to continue, or q <return> to quit---
#24 0x4000000003477c78 in cgraph_expand_all_functions ()
    at ../../gcc/gcc/cgraphunit.c:1206
#25 0x4000000003478814 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1429
#26 0x4000000003477468 in cgraph_finalize_compilation_unit ()
    at ../../gcc/gcc/cgraphunit.c:1078
#27 0x40000000006df120 in c_write_global_declarations ()
    at ../../gcc/gcc/c-decl.c:9378
#28 0x4000000001df1704 in compile_file () at ../../gcc/gcc/toplev.c:1050
#29 0x4000000001df5d94 in do_compile () at ../../gcc/gcc/toplev.c:2377
#30 0x4000000001df5f98 in toplev_main (argc=49, argv=0x800003fffdff0828)
    at ../../gcc/gcc/toplev.c:2419
#31 0x40000000009e6954 in main (argc=609379702, argv=0x6e3a203932343533)
    at ../../gcc/gcc/main.c:35


-- 
           Summary: [4.5 Regression] Segmentation fault in
                    lookup_page_table_entry
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11


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

Reply via email to