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/11607] New: [3.3.1 regression] Segmentation fault in gen-protos in stage2


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.3.1 regression] Segmentation fault in gen-protos in
                    stage2
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11

./xgcc -B./ -B/opt/gnu64/hppa64-hp-hpux11.11/bin/ -isystem /opt/gnu64/hppa64-hp-
hpux11.11/include -isystem /opt/gnu64/hppa64-hp-hpux11.11/sys-include fixtmp.c -
w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
  | sed -e 's/  / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  |  ./gen-protos >xsys-protos.hT
/bin/sh: 26493 Memory fault(coredump)

Running gen-protos under gdb, I see:

Program received signal SIGSEGV, Segmentation fault.
0x4000000000002e64 in add_hash (fname=0x800000010000ea33 "TLappend")
    at ../../gcc/gcc/gen-protos.c:44
44        if (hash_tab[i] != 0)
(gdb) printf "0x%lx\n", &hash_tab
0x8000000100000470
(gdb) printf "0x%lx\n", i
0xea5a53b
(gdb) info addr i
Symbol "i" is a variable in register r21.
(gdb) info addr hash_tab
Symbol "hash_tab" is static storage at address 0x8000000100000470.
gdb) disass 0x4000000000002e5c 0x4000000000002e6c
Dump of assembler code from 0x4000000000002e5c to 0x4000000000002e6c:
0x4000000000002e5c <add_hash+172>:      extrd,s ret0,63,32,r21
0x4000000000002e60 <add_hash+176>:      depd,z r21,61,62,r22
0x4000000000002e64 <add_hash+180>:      ldw,s r21(sr0,r24),r19
0x4000000000002e68 <add_hash+184>:
    cmpib,= 0,r19,0x4000000000002f0c <add_hash+348>
End of assembler dump.

The C code is:

  i = hashstr (fname, strlen (fname)) % HASH_SIZE;
  i0 = i;
  if (hash_tab[i] != 0)

It looks as if this failure is caused by this patch :(

2003-07-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

        PR Target/11453
        * pa.md: Disparage all mtsar constraints.
        (extzv, extv, insv): Don't fail on length of {32|64}.

This may also be the cause of the miscompilation reported in PR 11516.


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