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

RESOLVED FIXED in mozilla27

Status

()

--
major
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: joe, Assigned: ted)

Tracking

({sec-want})

Trunk
mozilla27
x86
Mac OS X
sec-want
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

7 years ago
Pure virtual calls explicitly call abort(), killing Firefox, but they aren't caught by Breakpad, so Firefox just disappears on people when they happen.

Comment 1

7 years ago
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

Comment 4

6 years ago
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)

Comment 5

6 years ago
Created attachment 742852 [details]
__stack_chk_fail crash, as seen by Mac OS X crash reporter

Updated

6 years ago
Severity: normal → major

Comment 6

5 years ago
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
Created attachment 805324 [details] [diff] [review]
Breakpad test for abort() crashes

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)
Created attachment 805459 [details] [diff] [review]
kill hung processes with SIGABRT on OS X in automation.py

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)
Created attachment 805461 [details] [diff] [review]
handle abort() in Breakpad on OS X.

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+
https://hg.mozilla.org/mozilla-central/rev/62cba8b2fd7d
https://hg.mozilla.org/mozilla-central/rev/742c8c54c8fc
https://hg.mozilla.org/mozilla-central/rev/751208f98deb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.