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

Unified Diff: base/security_unittest.cc

Issue 13061002: Make CallocDiesOnOOM return false under TSan and ASan. Their allocators return NULL in the case of … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/security_unittest.cc
===================================================================
--- base/security_unittest.cc (revision 189999)
+++ base/security_unittest.cc (working copy)
@@ -66,7 +66,12 @@
bool CallocDiesOnOOM() {
// 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.
-#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;
#else
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698