diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 20:23:04 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 20:23:04 +0000 |
commit | 2558a4d98d5bc9a828d289e7df795e9649745036 (patch) | |
tree | 29998b8ebd027673ca3491267d3b020b412ec452 /third_party | |
parent | 65f629a9e07e8e26e3f7a217e080a4e6fc511e4e (diff) | |
download | chromium_src-2558a4d98d5bc9a828d289e7df795e9649745036.zip chromium_src-2558a4d98d5bc9a828d289e7df795e9649745036.tar.gz chromium_src-2558a4d98d5bc9a828d289e7df795e9649745036.tar.bz2 |
[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
Review URL: http://codereview.chromium.org/7670025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/mach_override/README.chromium | 3 | ||||
-rw-r--r-- | third_party/mach_override/mach_override.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/third_party/mach_override/README.chromium b/third_party/mach_override/README.chromium index 065ade9..75a9938 100644 --- a/third_party/mach_override/README.chromium +++ b/third_party/mach_override/README.chromium @@ -19,4 +19,5 @@ implementations at run time. Local Modifications: -None. All local changes have been upstreamed. +Added the instructions to |possibleInstructions| for the very short +malloc_error_break() on 10.5 so that it can be overriden on that platform. diff --git a/third_party/mach_override/mach_override.c b/third_party/mach_override/mach_override.c index 1274133..2d12e43 100644 --- a/third_party/mach_override/mach_override.c +++ b/third_party/mach_override/mach_override.c @@ -530,6 +530,7 @@ typedef struct { #if defined(__i386__) static AsmInstructionMatch possibleInstructions[] = { + { 0x5, {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {0x55, 0x89, 0xe5, 0xc9, 0xc3} }, // push %ebp; mov %esp,%ebp; leave; ret { 0x1, {0xFF}, {0x90} }, // nop { 0x1, {0xFF}, {0x55} }, // push %esp { 0x2, {0xFF, 0xFF}, {0x89, 0xE5} }, // mov %esp,%ebp |