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 /base/process_util_linux.cc | |
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 'base/process_util_linux.cc')
-rw-r--r-- | base/process_util_linux.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc index 1f71f4d..b350517 100644 --- a/base/process_util_linux.cc +++ b/base/process_util_linux.cc @@ -718,6 +718,10 @@ int posix_memalign(void** ptr, size_t alignment, size_t size) { #endif // !defined(USE_TCMALLOC) } // extern C +void EnableTerminationOnHeapCorruption() { + // On Linux, there nothing to do AFAIK. +} + void EnableTerminationOnOutOfMemory() { #if defined(OS_ANDROID) // Android doesn't support setting a new handler. |