Re: GCC 4.6.2 C++ thread cancellation issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Dalpee <mikedalpee@xxxxxxxxxxxx> writes:

> I am trying to port some legacy code to properly work in the face of
> thread cancellation.

What thread library are you using?  E.g., are you using glibc on a
GNU/Linux system, or something else?

How are you cancelling the thread?  Via pthread_cancel or something
else?

Are you using an ARM system or something else?


> Based on information I have gleaned from searching the net, it appears
> that any catch(...) handlers that try to finalize the exception must
> be augmented to first catch abi::_forced_unwind and simply rethrow the
> exception for cancellation to work properly.

That seems plausible, assuming you use a simple "throw;" to rethrow the
exception.


> I am running into a problem where the rethrow of abi::_forced_unwind
> is being treated as an unhandled exception by the runtime, thereby
> causing an abort to occur.  So, my questions are:
>
> 1) Should what I am doing work?

Ideally, yes.

> 2) Is there a particular way GCC must be built for the rethrow to work?

No.

> 3) Is there a particular combination of GCC/GLIBC versions required
> for the rethrow to work?

The GCC version shouldn't matter.  The way that GLIBC was built does
matter.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux