This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exception handling in GCC 3.0.1 on AIX
- To: Dmitry Dolgopolov <d dot dolgopolov at websci dot ru>
- Subject: Re: Exception handling in GCC 3.0.1 on AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 20 Aug 2001 16:45:47 -0400
- cc: gcc at gcc dot gnu dot org
$ g++ dmitry.cc
$ dump -H a.out
***Import File Strings***
INDEX PATH BASE MEMBER
0 ...LIBPATH...
1 libc.a shr.o
2 libstdc++.a libstdc++.so.3
3 libgcc_s.a shr.o
$ ./a.out
Throwing exception...
Exception '268437520' catched
Something still is wrong with GCC's native exception handling
interaction with shared libraries on AIX. I suspect that somewhere the
shared library is using some data which it expects to be private to the
process, but currently is ending up shared. When the process tries to
write into the shared segment, the application is terminated.
If the archive file mode is set to disallow read-other, then the
shared library is placed in the AIX process private segment instead of the
shared text segment and throwing exceptions through shared libraries seems
to work (as above). In other words,
chmod a+x,o-r libstdc++.a libgcc_s.a
Exceptions do not work reliably when the GCC -static link option
is used.
David