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

Issue 7670025: [Mac] Implement base::EnableTerminationOnHeapCorruption() by overriding malloc_error_break(). (Closed)

Created:
9 years, 4 months ago by Robert Sesek
Modified:
9 years, 4 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

[Mac] Implement base::EnableTerminationOnHeapCorruption() by overriding malloc_error_break(). This makes malloc_error_break() fatal for all processes in an attempt to get better stack traces when heap corruption may occur. BUG=90884, 91068, 93191 TEST=See bug 93191 for repro steps. A crash report gets generated with a hopefully more-useful stack. Originally landed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97315 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=97322 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97351

Patch Set 1 #

Total comments: 12

Patch Set 2 : Spell 'dependencies' right #

Patch Set 3 : Address comments #

Patch Set 4 : Only one test #

Patch Set 5 : Patch mach_override #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -5 lines) Patch
M base/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M base/process_util_linux.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M base/process_util_mac.mm View 1 2 3 chunks +85 lines, -0 lines 3 comments Download
M base/process_util_posix.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M base/process_util_unittest.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/mach_override/README.chromium View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/mach_override/mach_override.c View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Robert Sesek
9 years, 4 months ago (2011-08-17 14:54:33 UTC) #1
Mark Mentovai
I’m glad you took this, because you did a good job with it and it ...
9 years, 4 months ago (2011-08-17 16:44:54 UTC) #2
Robert Sesek
Addressed all comments and added a test. I wished all tests were that easy/fun to ...
9 years, 4 months ago (2011-08-17 19:32:01 UTC) #3
Mark Mentovai
LGTM
9 years, 4 months ago (2011-08-17 21:16:29 UTC) #4
Robert Sesek
So the double-free part of the test does not work across all our machines/OSes. The ...
9 years, 4 months ago (2011-08-18 13:43:29 UTC) #5
Mark Mentovai
rsesek@chromium.org wrote: > So the double-free part of the test does not work across all ...
9 years, 4 months ago (2011-08-18 14:30:03 UTC) #6
Robert Sesek
On 2011/08/18 14:30:03, Mark Mentovai wrote: > mailto:rsesek@chromium.org wrote: > > So the double-free part ...
9 years, 4 months ago (2011-08-18 14:37:24 UTC) #7
Robert Sesek
On 2011/08/18 14:30:03, Mark Mentovai wrote: >Do things change if we do a small or ...
9 years, 4 months ago (2011-08-18 14:39:50 UTC) #8
Mark Mentovai
rsesek@chromium.org wrote: > On 2011/08/18 14:30:03, Mark Mentovai wrote: >> If we can deterministically tell ...
9 years, 4 months ago (2011-08-18 15:22:11 UTC) #9
Mark Mentovai
rsesek@chromium.org wrote: > Forgot to address this part: sometimes. When I tried with a smaller ...
9 years, 4 months ago (2011-08-18 15:37:51 UTC) #10
Robert Sesek
Ok. With mach_override patch now.
9 years, 4 months ago (2011-08-18 19:50:02 UTC) #11
Mark Mentovai
LGTM
9 years, 4 months ago (2011-08-18 20:21:07 UTC) #12
Scott Hess - ex-Googler
http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm File base/process_util_mac.mm (right): http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm#newcode510 base/process_util_mac.mm:510: malloc_error_break_t LookUpMallocErrorBreak() { Would it be worthwhile to unify ...
9 years, 4 months ago (2011-08-22 19:50:34 UTC) #13
Robert Sesek
http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm File base/process_util_mac.mm (right): http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm#newcode510 base/process_util_mac.mm:510: malloc_error_break_t LookUpMallocErrorBreak() { On 2011/08/22 19:50:35, shess wrote: > ...
9 years, 4 months ago (2011-08-22 19:52:14 UTC) #14
Mark Mentovai
9 years, 4 months ago (2011-08-22 20:07:23 UTC) #15
http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm
File base/process_util_mac.mm (right):

http://codereview.chromium.org/7670025/diff/2005/base/process_util_mac.mm#new...
base/process_util_mac.mm:510: malloc_error_break_t LookUpMallocErrorBreak() {
shess wrote:
> Would it be worthwhile to unify this with the comparable code in
> chrome/browser/ui/cocoa/objc_zombie.mm ?  Or would that just encourage this
kind
> of stuff?

My previous review comments on this thread tell you where I think we need to go
with this.

Powered by Google App Engine
This is Rietveld 408576698