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)

Categories

(Toolkit :: Crash Reporting, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: joe, Assigned: ted)

References

Details

(Keywords: sec-want)

Attachments

(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 (http://code.google.com/p/google-breakpad/issues/detail?id=318).

There's an upstream report about potentially handling SIGABRT, but it hasn't gone anywhere:
http://code.google.com/p/google-breakpad/issues/detail?id=343
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:
https://breakpad.appspot.com/618002/

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):
http://code.google.com/p/google-breakpad/source/detail?r=1205
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:
https://tbpl.mozilla.org/?tree=Try&rev=24c8d5b62900
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 automation.py. 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 automation.py

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.