Commit 6084078d authored by glider@chromium.org's avatar glider@chromium.org

Make CallocDiesOnOOM return false under TSan, MSan and ASan. Their allocators...

Make CallocDiesOnOOM return false under TSan, MSan and ASan. Their allocators return NULL in the case of an overflow.

BUG=175554,172149
TBR=mark

Review URL: https://chromiumcodereview.appspot.com/13061002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190437 0039d316-1c4b-4281-b951-d872f2087c98
parent 2759bae2
...@@ -66,7 +66,12 @@ bool IsTcMallocBypassed() { ...@@ -66,7 +66,12 @@ bool IsTcMallocBypassed() {
bool CallocDiesOnOOM() { bool CallocDiesOnOOM() {
// The wrapper function in base/process_util_linux.cc that is used when we // The wrapper function in base/process_util_linux.cc that is used when we
// compile without TCMalloc will just die on OOM instead of returning NULL. // compile without TCMalloc will just die on OOM instead of returning NULL.
#if defined(OS_LINUX) && defined(NO_TCMALLOC) // This function is explicitly disabled if we compile with AddressSanitizer,
// MemorySanitizer or ThreadSanitizer.
#if defined(OS_LINUX) && defined(NO_TCMALLOC) && \
(!defined(ADDRESS_SANITIZER) && \
!defined(MEMORY_SANITIZER) && \
!defined(THREAD_SANITIZER))
return true; return true;
#else #else
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment