summaryrefslogtreecommitdiffstats
path: root/base/process_util_linux.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 15:42:12 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 15:42:12 +0000
commit1e1e5df7ce713aaa5c7500203af277f2a60a4dcd (patch)
tree18d77e778c194b8b085538dc1257bf6878f5eb5f /base/process_util_linux.cc
parent7f8b26b5f223689de7af4803bc07e1e953ff5953 (diff)
downloadchromium_src-1e1e5df7ce713aaa5c7500203af277f2a60a4dcd.zip
chromium_src-1e1e5df7ce713aaa5c7500203af277f2a60a4dcd.tar.gz
chromium_src-1e1e5df7ce713aaa5c7500203af277f2a60a4dcd.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. Review URL: http://codereview.chromium.org/7670025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_linux.cc')
-rw-r--r--base/process_util_linux.cc4
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.