https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64167

            Bug ID: 64167
           Summary: [4.9
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
              Host: hppa2.0w-hp-hpux11.11
            Target: hppa2.0w-hp-hpux11.11
             Build: hppa2.0w-hp-hpux11.11

In stage2,

checking whether ln -s works... yes
checking for hppa2.0w-hp-hpux11.11-gcc... /mnt/gnu/gcc/objdir/./gcc/xgcc
-B/mnt/gnu/gcc/objdir/./gcc/ -B/nowhere/hppa2.0w-hp-hpux11.11/bin/
-B/nowhere/hppa2.0w-hp-hpux11.11/lib/ -isystem
/nowhere/hppa2.0w-hp-hpux11.11/include -isystem
/nowhere/hppa2.0w-hp-hpux11.11/sys-include
checking for suffix of object files... configure: error: in
`/mnt/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage2-target-libgcc] Error 1
make[2]: Leaving directory `/mnt/gnu/gcc/objdir-test'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/gnu/gcc/objdir-test'
make: *** [bootstrap] Error 2
Wed Dec  3 00:57:04 EST 2014

This is with r218299.

With following source,
int main () { return 0; }

there is a segv in
_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE:

(gdb) r
Starting program: /mnt/gnu/gcc/objdir-test/gcc/cc1 -fpreprocessed xxx.i -quiet
-dumpbase xxx.c -auxbase xxx -O -version -o xxx.s
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.
GNU C (GCC) version 4.9.3 20141203 (prerelease) [gcc-4_9-branch revision
218299] (hppa2.0w-hp-hpux11.11)
        compiled by GNU C version 4.9.3 20141203 (prerelease) [gcc-4_9-branch
revision 218299], GMP version 5.0.5, MPFR version 3.1.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.3 20141203 (prerelease) [gcc-4_9-branch revision
218299] (hppa2.0w-hp-hpux11.11)
        compiled by GNU C version 4.9.3 20141203 (prerelease) [gcc-4_9-branch
revision 218299], GMP version 5.0.5, MPFR version 3.1.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6b27250b3430efeeb5e5441a626bfbd3

Program received signal SIGSEGV, Segmentation fault.
_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE
(parser=0x7ae86708, fndef_ok=true, static_assert_ok=false,
    empty_ok=true, nested=0, start_attr_ok=1,
    objc_foreach_object_declaration=0x0, omp_declare_simd_clauses=...)
    at ../../gcc/gcc/c/c-parser.c:1796
1796                              ce = ce->declarator;

(gdb) disass $pc-16,$pc+16
Dump of assembler code from 0xa8f7c to 0xa8f9c:
   0x000a8f7c
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1636>:
       bb,*>=,n ret0,1f,0xa8f8c
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1652>
   0x000a8f80
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1640>:
       ldh 20(r18),ret0
   0x000a8f84
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1644>:
       depwi 1,22,1,ret0
   0x000a8f88
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1648>:
       sth ret0,20(r18)
=> 0x000a8f8c
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1652>:
       ldw 8(r6),r6
   0x000a8f90
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1656>:
       cmpib,= 0,r6,0xa8ee4
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1484>
   0x000a8f94
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1660>:
       copy r18,r26
   0x000a8f98
<_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE+1664>:
       ldw 0(r6),ret0
End of assembler dump.
(gdb) p/x $r6
$1 = 0x53
(gdb) bt
#0 
_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE
(parser=0x7ae86708, fndef_ok=true, static_assert_ok=false,
    empty_ok=true, nested=0, start_attr_ok=1,
    objc_foreach_object_declaration=0x0, omp_declare_simd_clauses=...)
    at ../../gcc/gcc/c/c-parser.c:1796
#1  0x000acc00 in _ZL29c_parser_external_declarationP8c_parser (
    parser=0x7ae86708) at ../../gcc/gcc/c/c-parser.c:1399
#2  0x000ad8ac in _Z12c_parse_filev () at ../../gcc/gcc/c/c-parser.c:1286
#3  0x000f2b74 in _Z19c_common_parse_filev ()
    at ../../gcc/gcc/c-family/c-opts.c:1067
#4  0x005551f8 in _ZL12compile_filev () at ../../gcc/gcc/toplev.c:548
#5  0x00557784 in _Z11toplev_mainiPPc (argc=0, argv=0x0)
    at ../../gcc/gcc/toplev.c:1926
#6  0x007ada78 in main (argc=1075151792, argv=0x0) at ../../gcc/gcc/main.c:36

%r6 contains misaligned page 0 address.

Reply via email to