public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Exceptions not caught on AIX 4.3.3 with gcc 3.0.4
@ 2003-02-04 16:47 Rémi Zara
  2003-02-04 17:09 ` John Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Rémi Zara @ 2003-02-04 16:47 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm trying to use xerces-c++ on AIX 4.3.3, using gcc 3.0.4.
I managed to build the shared xerces library, but I must have done something
wrong since as soon as an exception is thrown, my programs are aborted (in
pthread_kill), dispite the fact that there are appropriate catch statements.
The behavior is the same if the exception is thrown in the shared library or in
my code.

here is my setup:

%g++ -v
Reading specs from /softs/gcc-3.0.4/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0.4/specs
Configured with: ../gcc-3.0.4/configure --prefix=/softs/gcc-3.0.4
--enable-shared --enable-threads=posix --enable-languages=c++,java
Thread model: single
gcc version 3.0.4

Another version of gcc is also installed (2.95.2.1 19991024 (release)) under
/usr/local/bin/
How can I be sure that all the appropriate libraries are used (and that the 2
versions don't mix).

Thanks for your help,

Rémi Zara

-- 
http://www.remi-zara.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exceptions not caught on AIX 4.3.3 with gcc 3.0.4
  2003-02-04 16:47 Exceptions not caught on AIX 4.3.3 with gcc 3.0.4 Rémi Zara
@ 2003-02-04 17:09 ` John Love-Jensen
  2003-02-05  7:11   ` Rémi Zara
  0 siblings, 1 reply; 3+ messages in thread
From: John Love-Jensen @ 2003-02-04 17:09 UTC (permalink / raw)
  To: Rémi Zara, gcc-help

Hi Rémi,

If I recall correctly, exceptions don't work with C++ shared libraries in
3.0.x and earlier.

I know that they didn't work for GCC 2.95, and I know the technical details
why they were broken in 2.95.  (Discovered the hard way, using gdb and a lot
of patience.)

It was supposed to be fixed in 3.0, but I recall (vaguely) that it hadn't
been quite fixed correctly.  I don't know the exact 3.0 details, and I may
be mistaken about 3.0.

Exceptions thrown out of shared libraries MAY have been fixed in 3.1 or 3.2.
I haven't tested them, as we're using a strict C ABI with shared libraries,
so we do not throw exceptions over shared library boundaries.

Note:  with 2.95, one could have a problem even with exceptions throw and
caught WITHIN a shared library.  The library needed to be built a special
way (early binding).

The above is pertinent to SunOS, so may or may not be apropos for AIX.

Possible solutions are to use a static library (.a), or to upgrade to the
latest released GCC (3.2.x).

--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exceptions not caught on AIX 4.3.3 with gcc 3.0.4
  2003-02-04 17:09 ` John Love-Jensen
@ 2003-02-05  7:11   ` Rémi Zara
  0 siblings, 0 replies; 3+ messages in thread
From: Rémi Zara @ 2003-02-05  7:11 UTC (permalink / raw)
  To: John Love-Jensen; +Cc: gcc-help


Le mardi, 4 fév 2003, à 18:04 Europe/Paris, John Love-Jensen a écrit :

> It was supposed to be fixed in 3.0, but I recall (vaguely) that it 
> hadn't
> been quite fixed correctly.  I don't know the exact 3.0 details, and I 
> may
> be mistaken about 3.0.
>
> Exceptions thrown out of shared libraries MAY have been fixed in 3.1 
> or 3.2.
> I haven't tested them, as we're using a strict C ABI with shared 
> libraries,
> so we do not throw exceptions over shared library boundaries.

My problem happen even if I throw an exception in main() and catch it 
immediately...

> Note:  with 2.95, one could have a problem even with exceptions throw 
> and
> caught WITHIN a shared library.  The library needed to be built a 
> special
> way (early binding).

> The above is pertinent to SunOS, so may or may not be apropos for AIX.
>
> Possible solutions are to use a static library (.a), or to upgrade to 
> the
> latest released GCC (3.2.x).

I guess I will have to try with 3.2.x, then.

Thanks for your help,

Rémi
--
Rémi Zara
web: http://www.remi-zara.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-05  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-04 16:47 Exceptions not caught on AIX 4.3.3 with gcc 3.0.4 Rémi Zara
2003-02-04 17:09 ` John Love-Jensen
2003-02-05  7:11   ` Rémi Zara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).