diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-31 06:49:12 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-31 06:49:12 +0000 |
commit | 1d12bbadf1ef9efeccb8d3215e846e90bf6bdc7e (patch) | |
tree | 2cc502f624cab416071458439048b3e6fffd2c8e /base | |
parent | 84896cf532157415201d85c98fb0f6eb7cee7e69 (diff) | |
download | chromium_src-1d12bbadf1ef9efeccb8d3215e846e90bf6bdc7e.zip chromium_src-1d12bbadf1ef9efeccb8d3215e846e90bf6bdc7e.tar.gz chromium_src-1d12bbadf1ef9efeccb8d3215e846e90bf6bdc7e.tar.bz2 |
Disable EnableTerminationOnOutOfMemory under AddressSanitizer.
Review URL: http://codereview.chromium.org/9958013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/process_util_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm index 3ab2fb6..e6ccd32 100644 --- a/base/process_util_mac.mm +++ b/base/process_util_mac.mm @@ -834,6 +834,9 @@ void EnableTerminationOnOutOfMemory() { ChromeMallocZone* purgeable_zone = reinterpret_cast<ChromeMallocZone*>(GetPurgeableZone()); +#ifndef ADDRESS_SANITIZER + // Don't do anything special on OOM for the malloc zones replaced by + // AddressSanitizer, as modifying or protecting them may not work correctly. vm_address_t page_start_default = 0; vm_address_t page_start_purgeable = 0; vm_size_t len_default = 0; @@ -907,6 +910,7 @@ void EnableTerminationOnOutOfMemory() { PROT_READ); } } +#endif // === C malloc_zone_batch_malloc === @@ -933,6 +937,7 @@ void EnableTerminationOnOutOfMemory() { std::set_new_handler(oom_killer_new); +#ifndef ADDRESS_SANITIZER // === Core Foundation CFAllocators === // This will not catch allocation done by custom allocators, but will catch @@ -970,6 +975,7 @@ void EnableTerminationOnOutOfMemory() { NSLog(@"Internals of CFAllocator not known; out-of-memory failures via " "CFAllocator will not result in termination. http://crbug.com/45650"); } +#endif // === Cocoa NSObject allocation === |