This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)



Godmar wrote:
>  - change the gcc driver to pick the threading system you'd like to use
>    when linking an executable.

On many systems there are extra complications.  I'll use Linux as an
example.  There are real opportunities to mess things up right now
because glibc does not use the same exception mechanisms that we use
in GCC.  My most recent experience with this was in libgcj.  We used
to throw an exception from the pthread cancellation callback.  This
doesn't work :-)

Fortunately that part of the java spec was deprecated so we took it
out of our implementation.

I discussed this with Ulrich recently.  It seems that the ideal
situation is to have glibc use some kind of structured exception
handling scheme in C which will generate the same EH bits that g++/gcj
use.  In this case when you throw an exception through a glibc
callback, all of the various glibc/libio cleanups happen in addition
to user code.

My point is that you may be forced to use a particular implementation
on some systems for safety sake.

AG

-- 
Anthony Green                                                        Red Hat
                                                       Sunnyvale, California

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]