This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
C++ throw() dumps core on sunos 5.5.1
- To: gcc-bugs at gcc dot gnu dot org
- Subject: C++ throw() dumps core on sunos 5.5.1
- From: Sverker Wiberg <sverkerw at erix dot ericsson dot se>
- Date: Mon, 30 Aug 1999 13:58:52 +0200
When a C++-program compiled by GCC 2.95.1 on sunos 5.5.1 throw()s an
exception, a bus error (with accompanying core dump) is unexpectedly
raised.
Compilation output and prerocessed source are included.
Here is the GDB stack trace:
bash$ gdb conftest core
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for
details.
GDB 4.16 (sparc-sun-solaris2.5.1),
Copyright 1996 Free Software Foundation, Inc...
Core was generated by `./conftest'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libelf.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libintl.so.1...done.
Reading symbols from /usr/lib/libmp.so.1...done.
Reading symbols from /usr/lib/libw.so.1...done.
Reading symbols from
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
#0 0x138a4 in execute_cfa_insn (p=0x26352, state=0xeffff3b0,
info=0xeffff5f0,
pc=0x0) at ./frame.c:626
626 {
(gdb) info frame
Stack level 0, frame at 0xeffff348:
pc = 0x138a4 in execute_cfa_insn (./frame.c:626); saved pc 0x13dfc
called by frame at 0xeffff640
source language c.
Arglist at 0xeffff348, args: p=0x26352, state=0xeffff3b0,
info=0xeffff5f0,
pc=0x0
Locals at 0xeffff348,
(gdb) info locals
No locals.
(gdb) up
#1 0x13dfc in __frame_state_for (pc_target=0x12720,
state_in=0xeffff6b0)
at ./frame.c:627
627 case DW_CFA_set_loc:
(gdb) up
#1 0x13dfc in __frame_state_for (pc_target=0x12720,
state_in=0xeffff6b0)
at ./frame.c:627
627 case DW_CFA_set_loc:
(gdb) info frame
Stack level 1, frame at 0xeffff640:
pc = 0x13dfc in __frame_state_for (./frame.c:627); saved pc 0x12734
called by frame at 0xeffff900, caller of frame at 0xeffff348
source language c.
Arglist at 0xeffff640, args: pc_target=0x12720, state_in=0xeffff6b0
Locals at 0xeffff640,
(gdb) info locals
No locals.
(gdb) up
#2 0x12734 in __throw ()
(gdb) info frame
Stack level 2, frame at 0xeffff900:
pc = 0x12734 in __throw; saved pc 0x118c4
called by frame at 0xeffff980, caller of frame at 0xeffff640
source language c.
Arglist at 0xeffff900, args:
Locals at 0xeffff900,
(gdb) info locals
No locals.
(gdb) up
#3 0x118c4 in main ()
(gdb) info frame
Stack level 3, frame at 0xeffff980:
pc = 0x118c4 in main; saved pc 0x11734
caller of frame at 0xeffff900
Arglist at 0xeffff980, args:
Locals at 0xeffff980,
(gdb) info locals
No symbol table info available.
(gdb) quit
/Sverker Wiberg
Reading specs from /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/cpp -lang-c++ -v -I/opt/local/include -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) conftest.C conftest.ii
GNU CPP version 2.95.1 19990816 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/opt/local/include
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/../../../../include/g++-3
/opt/local/pgm/gcc-2.95.1/include
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/../../../../sparc-sun-solaris2.5.1/include
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/cc1plus conftest.ii -quiet -dumpbase conftest.cc -O -O0 -version -fno-exceptions -fexceptions -o conftest.s
GNU C++ version 2.95.1 19990816 (release) (sparc-sun-solaris2.5.1) compiled by GNU C version 2.95.1 19990816 (release).
/opt/local/pgm/binutils-2.9.1/bin/as -V -Qy -s -o conftest.o conftest.s
GNU assembler version 2.9.1 (sparc-sun-solaris2.5.1), using BFD version 2.9.1
/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o conftest /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/crt1.o /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/crti.o /usr/ccs/lib/values-Xa.o /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/crtbegin.o -L/usr/local/lib -L/usr/share/lib -L/opt/local/lib -L/opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/local/pgm/gcc-2.95.1/lib conftest.o -lcurses -ltermcap -ldl -lelf -lsocket -lnsl -lstdc++ -lm -lgcc -lc -lgcc /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/crtend.o /opt/local/pgm/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.1/crtn.o
GNU ld version 2.9.1 (with BFD 2.9.1)
Supported emulations:
elf32_sparc
# 1 "conftest.C"
extern "C" void exit(int);
class Ex {};
int main ()
{
try {
throw Ex();
return 1;
} catch (Ex &ex) {
return 0;
} catch (...) {
return 1;
}
}