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

Unified Diff: base/process_util_mac.mm

Issue 9597031: In CrMallocErrorBreak, do not kill the process if errno is ENOMEM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/process_util_unittest.cc » ('j') | base/process_util_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_mac.mm
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index 6b39a614e4404d81991f0694159ed76e89e86d8b..39edb29d3e34c5c2f27b87a72b9a8646d4c50f34 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -549,6 +549,13 @@ malloc_error_break_t LookUpMallocErrorBreak() {
void CrMallocErrorBreak() {
g_original_malloc_error_break();
+
+ // Out of memory is certainly not heap corruption, and not necessairly
Scott Hess - ex-Googler 2012/03/05 20:34:20 s/necessairly/correct spelling/ Also, I think the
Robert Sesek 2012/03/06 01:16:27 Spalling es ovarraited.
+ // something for which the process should be terminated. Leave that decision
+ // to the OOM killer.
+ if (errno == ENOMEM)
+ return;
+
// A unit test checks this error message, so it needs to be in release builds.
LOG(ERROR) <<
"Terminating process due to a potential for future heap corruption";
« no previous file with comments | « no previous file | base/process_util_unittest.cc » ('j') | base/process_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698