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: Throwing C++ exceptions in signal handlers


Roger Sayle wrote:
> 
> I have a strange question to ask of the GCC folks that understand
> more about exception handling and signals than I do.  Is it reasonable
> (or safe) to throw an exception in a signal handler.
It is neither.


> Might it be safer to comment out "raise" in cp/cfns.gperf, or is
> throwing an exception in a signal handler explicitly forbidden?
It is not permitted.

throwing an exception, is more than simply (sig)longjmp.

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


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