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]
Other format: [Raw text]

Re: C++ vs. pthread_cancel


On Mon, 2005-08-15 at 09:53 -0400, Daniel Jacobowitz wrote:
> On Mon, Aug 15, 2005 at 09:51:17AM -0400, Andrew Pinski wrote:
> > > Yes, I'm aware of the list. My question was what the current behaviour
> > > of the various gcc versions is. And if gcc supports the various work
> > > around mentiod. Like explicity configuring the behavour of the 'catch
> > > (...)' etc..
> > 
> > There is none yet because there have been no consensus yet.  That is 
> > why I mentioned the list.  GCC is not going to implement anything
> > until there is a consensus of how to proceed.
> 
> Eh, that's obviously incorrect.  The feature was implemented back in
> 3.3; the behavior hasn't been _changed_ and won't be until there is
> consensus.
> 
> I believe that it's still can be caught, must be rethrown, or the
> program will be aborted.  Someone who knows better than I may want to
> confirm this.
> 

AFAICT this is idd correct; I've been reading the libstdc++5 and NPTL
sources. However once it is caught it is impossible to distinguish from
other exceptions due to the lack of exception information set in:
  glibc-2.3.5/nptl/unwind.c:__pthread_unwind()
Hence once is left in the situation where both forward and backward are
not an option.

Nor do I think they (being the company I work for) will allow me to ship
patched versions of libpthread.so and libstdc++.so.5.

Too bad, guess I have to redesign the issue.

Peter Zijlstra


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