This is the mail archive of the
mailing list for the Cygwin project.
Re: gcc4: throwing exception from signal handler
On Thu, Jul 08, 2010 at 01:02:28PM -0400, Don Ward wrote:
>Dave Korn wrote:
>> On 08/07/2010 14:01, Don Ward wrote:
>>> I would like to be able to catch certain signals (SIGSEGV and SIGSYS)
>>> and throw a C++ exception (to be caught in a try/catch construct). As a
>>> simple example:
>>> Am I misunderstanding how this should work or doing something wrong? Or
>>> is this a problem with Cygwin or gcc?
>> Throwing exceptions from a signal handler is a can of worms that requires
>> support from both the compiler and the C runtime.
>> I was working on adding
>> this support for the distro package of gcc-4.5 before I had to go AWOL a
>> couple of weeks ago; it requires building the Cygwin DLL with EH tables,
>> adding support in the last-chance stack unwinder in libgcc that is able to
>> unwind past our sigfe/sigbe stuff.
>I'm glad someone is (or will be) working on it. In the meanwhile, I can
>make do with gcc 3.4.4.
Someone may be looking into this but if this is adding complication to the signal
handler it is going to take some real convincing that it should go into the DLL.
Dave, this is something that you should be talking about early rather than springing
it as a patch in cygwin-patches.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple