public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "danglin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/11607] New: [3.3.1 regression] Segmentation fault in gen-protos in stage2
Date: Sun, 20 Jul 2003 17:15:00 -0000	[thread overview]
Message-ID: <20030720171534.11607.danglin@gcc.gnu.org> (raw)

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.


             reply	other threads:[~2003-07-20 17:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20 17:15 danglin at gcc dot gnu dot org [this message]
2003-07-21 15:35 ` [Bug target/11607] " danglin at gcc dot gnu dot org
2003-07-23 15:18 ` cvs-commit at gcc dot gnu dot org
2003-07-23 15:53 ` cvs-commit at gcc dot gnu dot org
2003-07-23 16:12 ` danglin at gcc dot gnu dot org
2003-07-25 16:28 ` jbuck at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030720171534.11607.danglin@gcc.gnu.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).