Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Issue 11645055: [Mac] Override abort() to crash into breakpad. (Closed)

Created:
8 years ago by Scott Hess - ex-Googler
Modified:
7 years, 7 months ago
CC:
chromium-reviews, sail+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

[Mac] Override abort() to crash into breakpad. abort() sends SIGABRT, breakpad unfortunately does not intercept signal crashes. Override abort() to crash in a way that breakpad will intercept. BUG=57504 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201978

Patch Set 1 #

Patch Set 2 : Catch signal handler instead. #

Patch Set 3 : unmask signals in the handler. #

Total comments: 6

Patch Set 4 : tweak comment and signal mask. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
M chrome/app/breakpad_mac.mm View 1 2 3 2 chunks +26 lines, -0 lines 2 comments Download

Messages

Total messages: 24 (0 generated)
Scott Hess - ex-Googler
Initially, I was going to go with process_util_mac.mm, which wouldn't need the DEPS change, but ...
8 years ago (2012-12-20 23:38:33 UTC) #1
Mark Mentovai
mach_override is an awfully crude (and awfully awful) hammer, but this problem doesn’t need to ...
8 years ago (2012-12-21 00:55:55 UTC) #2
Scott Hess - ex-Googler
On 2012/12/21 00:55:55, Mark Mentovai wrote: > mach_override is an awfully crude (and awfully awful) ...
8 years ago (2012-12-21 01:55:14 UTC) #3
Mark Mentovai
SIGFPE is already handled. SIGSYS neet not concern you. You can scope this to just ...
8 years ago (2012-12-21 18:42:12 UTC) #4
Scott Hess - ex-Googler
OK, WDYT of this? Sigh, I'm pretty sure it is wrong. I tested this by ...
7 years, 7 months ago (2013-05-16 23:31:23 UTC) #5
Mark Mentovai
What happens if the breakpads are off? What happens if you put your abort-caller after ...
7 years, 7 months ago (2013-05-17 16:07:47 UTC) #6
Robert Sesek
Also note that Breakpad has SIGABRT handling on iOS already for the in-process handler. https://code.google.com/p/google-breakpad/source/browse/trunk/src/client/mac/handler/exception_handler.cc#629
7 years, 7 months ago (2013-05-17 16:47:11 UTC) #7
Scott Hess - ex-Googler
On 2013/05/17 16:07:47, Mark Mentovai wrote: > What happens if the breakpads are off? > ...
7 years, 7 months ago (2013-05-17 22:41:20 UTC) #8
Scott Hess - ex-Googler
On 2013/05/17 16:47:11, rsesek wrote: > Also note that Breakpad has SIGABRT handling on iOS ...
7 years, 7 months ago (2013-05-17 22:56:03 UTC) #9
Scott Hess - ex-Googler
Nevermind, I see the problem, Libc-825.25/stdlib/FreeBSD/abort.c: void abort() { struct sigaction act; if (!CRGetCrashLogMessage()) CRSetCrashLogMessage("abort() ...
7 years, 7 months ago (2013-05-17 23:20:33 UTC) #10
Scott Hess - ex-Googler
OK, this version unmasks in the handler. I cannot craft a reasoned argument for why ...
7 years, 7 months ago (2013-05-17 23:39:05 UTC) #11
Scott Hess - ex-Googler
pingalingaling?
7 years, 7 months ago (2013-05-21 22:47:54 UTC) #12
Mark Mentovai
https://codereview.chromium.org/11645055/diff/14001/chrome/app/breakpad_mac.mm File chrome/app/breakpad_mac.mm (right): https://codereview.chromium.org/11645055/diff/14001/chrome/app/breakpad_mac.mm#newcode142 chrome/app/breakpad_mac.mm:142: // The OSX abort() implementation masks all signals for ...
7 years, 7 months ago (2013-05-22 14:23:01 UTC) #13
Scott Hess - ex-Googler
PTAL? https://codereview.chromium.org/11645055/diff/14001/chrome/app/breakpad_mac.mm File chrome/app/breakpad_mac.mm (right): https://codereview.chromium.org/11645055/diff/14001/chrome/app/breakpad_mac.mm#newcode142 chrome/app/breakpad_mac.mm:142: // The OSX abort() implementation masks all signals ...
7 years, 7 months ago (2013-05-22 21:38:28 UTC) #14
Mark Mentovai
LGTM
7 years, 7 months ago (2013-05-23 02:46:15 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/11645055/20001
7 years, 7 months ago (2013-05-23 19:37:49 UTC) #16
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=4672
7 years, 7 months ago (2013-05-23 19:46:32 UTC) #17
Scott Hess - ex-Googler
thakis for chrome/OWNERS review, since cpu for chrome/app/OWNERS seems less applicable to this change.
7 years, 7 months ago (2013-05-23 20:13:23 UTC) #18
Scott Hess - ex-Googler
Apologies, but autocomplete gave me @google.com over @chromium.org.
7 years, 7 months ago (2013-05-23 20:14:10 UTC) #19
Nico
lgtm, but: https://chromiumcodereview.appspot.com/11645055/diff/20001/chrome/app/breakpad_mac.mm File chrome/app/breakpad_mac.mm (right): https://chromiumcodereview.appspot.com/11645055/diff/20001/chrome/app/breakpad_mac.mm#newcode298 chrome/app/breakpad_mac.mm:298: // intercept. Why doesn't breakpad do that?
7 years, 7 months ago (2013-05-23 21:27:50 UTC) #20
Mark Mentovai
Short answer: Breakpad hooks Mach exceptions, which are triggered by hardware traps. SIGABRT is generated ...
7 years, 7 months ago (2013-05-23 21:32:28 UTC) #21
Scott Hess - ex-Googler
thanks https://chromiumcodereview.appspot.com/11645055/diff/20001/chrome/app/breakpad_mac.mm File chrome/app/breakpad_mac.mm (right): https://chromiumcodereview.appspot.com/11645055/diff/20001/chrome/app/breakpad_mac.mm#newcode298 chrome/app/breakpad_mac.mm:298: // intercept. On 2013/05/23 21:27:50, Nico wrote: > ...
7 years, 7 months ago (2013-05-23 21:32:59 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/11645055/20001
7 years, 7 months ago (2013-05-23 21:33:44 UTC) #23
commit-bot: I haz the power
7 years, 7 months ago (2013-05-24 06:23:06 UTC) #24
Message was sent while issue was closed.
Change committed as 201978

Powered by Google App Engine
This is Rietveld 408576698