g++ (egcs) bug report
Piotr
Piotr
Mon Aug 17 15:15:00 GMT 1998
This is bug report for g++ (egcs, as you call it now :-) ).
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
my system is linux:
Linux localhost.localdomain 2.0.35 #3 Thu Aug 13 23:48:14 CEST 1998 i686 unknown
(actually this is standard Redhat 5.1 installation with newer kernel)
my binutils are:
$ rpm -q binutils
binutils-2.9.1.0.4-2
The problem is simple - I can't (in any way) use exceptions in shared
libraries on Linux. I'm including example.tgz with example program and
Makefile, but this is only example - I've tried this in many ways, on
Redhat 5.1 with glibc and on Redhat 4.1 with ELF libc 5.x, with g++ 2.7.2
and -fhandle-exceptions, with g++ 2.8.1 and with egcs 1.0.2 - result
is always the same, SIGABRT in place where throw is used.
Linking things static works fine (try make static; ./static),
but I need dynamic linking in my project (few applications using one
common - and big - set of classes).
It'd be very nice if you could me send some information about this
problem - I've searched through dozens of FAQ's, newsgroups, asked
many peoples, no one knows anything about this.
BTW, debugging my test program I've found:
Program received signal SIGABRT, Aborted.
0x4008b6a1 in __kill ()
Current language: auto; currently c
(gdb) where
#0 0x4008b6a1 in __kill ()
#1 0x4008b4cf in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x4008c6df in abort () at ../sysdeps/generic/abort.c:83
#3 0x400424b5 in __default_terminate ()
#4 0x400424da in __terminate ()
#5 0x40042b7d in __throw ()
#6 0x4000b510 in f1 () at sub.cc:6
#7 0x8048854 in main () at main.cc:9
So I guess I can throw, but I cannot catch in *.so - maybe this will help
you in any way.
P.S. I have read through diffs from 1.0.2 to the most current version of
egcs and it doesn't seem this bug has been fixed - actually there's
nothing about shared libraries there.
--
Piotr Piątkowski, Uczelniane Centrum Informatyki, AGH Krakow, POLAND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tgz
Type: application/x-gzip
Size: 576 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19980817/34971370/attachment.bin>
More information about the Gcc-bugs
mailing list