[416] in Pthreads mailing list archive
Re: C++ exception handling and pthreads
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Mon Sep 23 00:52:50 1996
To: erwin@htsa.hva.nl
Cc: pthreads@MIT.EDU
From: Ken Raeburn <raeburn@raeburn.org>
Date: 23 Sep 1996 00:20:44 -0400
In-Reply-To: erwin@htsa.hva.nl's message of Sun, 22 Sep 1996 20:01:15 METDST
> Hi there,
>
> I tried to write a program in C++ useing pthreads, which works fine.
> But now i was trying to use throw,try, and catch in my C++ program
> and now it became a random error generator. I removed all the throw,
> try stuff but still compiled with g++ -fhandle-exceptions (g++ 2.7.2)
> and that causes the program to die with a segmentation fault also.
The exception handling code in GCC has been getting a fair amount of
work done on it lately. However, it's not even attempting to be
thread-safe. Fixing that requires changing both the compiler and the
support code in libgcc. The compiler generates assignments to global
variables and calls or jumps into library code that reads them, with
no locking.
> Now my question is , is it posible to use C++ exception handling
> with pthreads in the first place ?
It should be. But it isn't with g++ right now.