Closed Bug 717758 Opened 9 years ago Closed 7 years ago

abort() isn't caught by Breakpad (e.g. pure virtual calls, stack buffer overflow checks)


(Toolkit :: Crash Reporting, defect)

Not set





(Reporter: joe, Assigned: ted)



(Keywords: sec-want)


(4 files)

Pure virtual calls explicitly call abort(), killing Firefox, but they aren't caught by Breakpad, so Firefox just disappears on people when they happen.
Yes, abort() on Mac doesn't trigger breakpad. Is there a way to alter the default behavior, perhaps by implementing or injecting an alternative _purecall?
We also don't handle stack overflow on Mac (bug 507876), or unhandled C++ exceptions (

There's an upstream report about potentially handling SIGABRT, but it hasn't gone anywhere:
Duplicate of this bug: 795754
I hit the same problem today with a stack buffer overflow (bug 866544).
Keywords: sec-want
Summary: Pure virtual calls aren't caught by Breakpad → abort() isn't caught by Breakpad (e.g. pure virtual calls, stack buffer overflow checks)
Severity: normal → major
Also happens with release-mode assertion failures in system libraries (e.g. bug 903722).
This might be fixable with the WIP patch I mentioned in bug 525296, since that catches SIGABRT.
Patch up for upstream review:

Turns out it was not hard to finish up, I should have done that ages ago.
Assignee: nobody → ted
Blocks: 525296
Landed this upstream, I'll get our in-tree copy updated (or cherrypick this):
I'm just going to cherry-pick the patch from upstream and land it. I added a unit test here for sanity's sake. Try push here also for sanity:
Attachment #805324 - Flags: review?(mh+mozilla)
Being lazy, just going to put this patch here too. Since SIGABRT didn't work on Mac historically we didn't try to use it in This patch changes that. It's also going to bitrot jhammel's big Mochitest-rework patch, but what can you do?
Attachment #805459 - Flags: review?(jmaher)
This is the upstream patch with r=mento.
Comment on attachment 805459 [details] [diff] [review]
kill hung processes with SIGABRT on OS X in

Review of attachment 805459 [details] [diff] [review]:

can't argue with this.
Attachment #805459 - Flags: review?(jmaher) → review+
Attachment #805324 - Flags: review?(mh+mozilla) → review+
You need to log in before you can comment on or make changes to this bug.