public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: jakob@unthought.net
To: gcc-gnats@gcc.gnu.org
Subject: c++/6378: Segfault/bus-error on UltraSPARC/Solaris8 with virtual inheritance
Date: Fri, 19 Apr 2002 14:16:00 -0000	[thread overview]
Message-ID: <20020419211427.918.qmail@sources.redhat.com> (raw)


>Number:         6378
>Category:       c++
>Synopsis:       Segfault/bus-error on UltraSPARC/Solaris8 with virtual inheritance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 19 14:16:05 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     jakob@unthought.net
>Release:        gcc version 3.0.4
>Organization:
>Environment:
SunOS sol 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-1
GCC configured with: ./configure --enable-languages=c,c++ --disable-threads --with-as=/usr/local/bin/as --with-gnu-as --with-ld=/usr/local/bin/ld --with-gnu-ld
>Description:
The generated program will either SIGSEGV or SIGBUS in the throw handling code (ev_throw and friends), in certain situations when one uses virtual inheritance.

So far my testing shows the error on:
*) The system described here (ultrasparc)
*) FreeBSD 4.5 with gcc-2.95.3 (ia32)
*) FreeBSD 4.5 with gcc-3.0.4 (ia32)

And I cannot provoke the error on:
*) RedHat Linux 7.2 with gcc-2.96-98 (ia32)
*) Debian GNU/Linux 2.2 with gcc-3.0.3 (ia32)
*) SuSE Linux 7.3 with gcc-2.95.3 (ia32)
*) HP-UX 11 with gcc-3.0.1 (parisc)

>How-To-Repeat:
Compile the attached program (test.cc) and run it. It ought to print out: "Caught e=0",  but when the problem exists the program will instead segfault or die with a bus error.

The comments (XXX_A, XXX_B, and the XXX_C pair) identify places in the code where you can work around the bug. There may be more ways to do that, but those were the ones my initial testing found.



>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-04-19 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-19 14:16 jakob [this message]
2002-05-03 15:41 davem

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=20020419211427.918.qmail@sources.redhat.com \
    --to=jakob@unthought.net \
    --cc=gcc-gnats@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).