This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Exceptions, Optimizations and AIX
- From: Joerg dot Richter at pdv-FS dot de
- To: gcc at gcc dot gnu dot org
- Date: Tue, 2 Sep 2003 13:40:11 +0200
- Subject: Exceptions, Optimizations and AIX
Hi,
I am using gcc-3.2.1 on powerpc-ibm-aix5.1.0.0
Sometimes I have the problem that certain exceptions in a large scale
program with a lot of shared libs don't get caught. When this situation
occurs it is easy reproducible. Its not the first time I try to find this
bug. But perhaps now i have a little glue why this happens.
In the case i am investigating now i could reduce the problem to one shared
lib. Exchanging this special lib with one from a library-set where the
exception gets caught made the program run normally.
The library set where it does not work was build with some optimizations
(some objects where built with -O1). The library set where it works was
build without any optimizations.
I think that the problem arises when optimized and unoptimized libraries get
mixed.
I dont know the exception handling very well, but is it possible that the
unwind information for optimized and unoptimized objects get mixed?
I am interested in the case where two objects use the same header which
defines an inline function. One object is optimized and the other is not.
What when the runtime exception handling uses the wrong unwind information
for this inline function (eg. optimized uses non optimized)? Is this
possible?
Or is it not OK to mix optimized and unoptimized objects/libraries?
I think the problem is not only AIX related. Perhaps is has something to do
with weak symbol support or the like.
Thanks in advance
Joerg Richter
p.s. Note that i was always aware of slibclean and chmod o-r to make the
program always take the library i wanted.