c++/6378: Segfault/bus-error on UltraSPARC/Solaris8 with virtual inheritance
jakob@unthought.net
jakob@unthought.net
Fri Apr 19 14:40:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list