Index: base/process_util_mac.mm |
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm |
index 6b39a614e4404d81991f0694159ed76e89e86d8b..af75d06bff83963a5a98e69c3387067b754f05fe 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 necessarily |
+ // 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"; |