[Bug c++/16061] New: c++ throw generates sigabrt
greg dot weeks at timesys dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 18 13:36:00 GMT 2004
I've tried this on three different versions of the compiler built for i686. This
is the most current one I have built. It's a December snapshot of 3.4. Since
it's been there since 3.2 and I didn't find a prior bug report for it I expect
it's still there. When doing a simple try/catch/throw sequence I get a sigabrt
instead of the catch. It only happens on an i686 build. When I build for i585 it
works fine. It also only happens when using dynamic linking. a -static compile
works also.
bash-2.05# g++ -v -save-temps -Wall throw2.cpp -o throw2
Reading specs from /usr/lib/gcc/i686-linux/3.4/specs
Configured with: ../package/configure --build=i686-linux --host=i686-linux
--target=i686-linux --prefix=/usr --enable-initfini-array
--enable-languages=c,c++ --enable-shared --enable-threads=posix --with-gnu-as
--with-gnu-ld --disable-sjlj-exceptions
Thread model: posix
gcc version 3.4 20031210 (experimental)
/usr/libexec/gcc/i686-linux/3.4/cc1plus -E -quiet -v -D_GNU_SOURCE throw2.cpp
-mtune=pentiumpro -Wall -o throw2.ii
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/i686-linux/3.4/../../../../include/c++/3.4
/usr/lib/gcc/i686-linux/3.4/../../../../include/c++/3.4/i686-linux
/usr/lib/gcc/i686-linux/3.4/../../../../include/c++/3.4/backward
/usr/local/include
/usr/lib/gcc/i686-linux/3.4/include
/usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/include
End of search list.
/usr/libexec/gcc/i686-linux/3.4/cc1plus -fpreprocessed throw2.ii -quiet
-dumpbase throw2.cpp -mtune=pentiumpro -auxbase throw2 -Wall -version -o throw2.s
GNU C++ version 3.4 20031210 (experimental) (i686-linux)
compiled by GNU C version 3.4 20031210 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/bin/as -V -Qy -o throw2.o
throw2.s
GNU assembler version 2.14.90.0.7 (i686-linux) using BFD version 2.14.90.0.7
20031029
/usr/libexec/gcc/i686-linux/3.4/collect2 --eh-frame-hdr -m elf_i386
-dynamic-linker /opt/timesys/linux/5.0/toolchains/i686-linux/lib/ld-linux.so.2
-o throw2 /usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/lib/crt1.o
/usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/lib/crti.o
/usr/lib/gcc/i686-linux/3.4/crtbegin.o -L/usr/lib/gcc/i686-linux/3.4
-L/usr/lib/gcc/i686-linux/3.4
-L/usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/lib
-L/usr/lib/gcc/i686-linux/3.4/../../.. throw2.o -lstdc++ -lm -lgcc_s -lgcc -lc
-lgcc_s -lgcc /usr/lib/gcc/i686-linux/3.4/crtend.o
/usr/lib/gcc/i686-linux/3.4/../../../../i686-linux/lib/crtn.o
bash-2.05# ./throw2
Aborted
bash-2.05#
The program code in throw2.cpp is:
class CTryObj
{
public:
CTryObj(){;}
public:
int tfunction( void ){
throw 1;
return 0;
}
};
int main( void )
{
CTryObj to;
try
{
to.tfunction();
}
catch(...)
{
}
return 0;
}
--
Summary: c++ throw generates sigabrt
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: greg dot weeks at timesys dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16061
More information about the Gcc-bugs
mailing list