gohome1984 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Mac exception_handler doesn't catch uncaught C++ exceptions #318

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
throw an exception and don't catch it. e.g.
throw 1;

What is the expected output? What do you see instead?
Breakpad should catch the uncaught exception and generate a minidump.
Instead, the application crashes and the Mac system crash reporter is 
called, showing this exception information:
Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

What version of the product are you using? On what operating system?
r337 on Mac OS 10.5.6

Please provide any additional information below.
The following is logged into stderr before the program terminates
terminate called after throwing an instance of 'int'
Abort trap

Original issue reported on code.google.com by ylenerr...@gmail.com on 14 May 2009 at 10:41

GoogleCodeExporter commented 9 years ago
From poking around, we might be able to use a terminate handler to catch these:
http://www.cplusplus.com/reference/std/exception/set_terminate/

Original comment by ted.mielczarek on 10 Sep 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Here's a start of a patch for this. It registers a terminate handler, but 
doesn't
actually do anything in the callback. Unfortunately, set_terminate doesn't 
offer a
way to save a context pointer, so to get back to the ExceptionHandler instance 
that
registered this handler, in order to actually write a dump, we'll probably need 
to
implement something like the Windows ExceptionHandler does, with a vector of
installed handlers and synchronization around them. Bleh.

Original comment by ted.mielczarek on 29 Sep 2009 at 3:22

Attachments: