Merge

llvm-svn: 306748
diff --git a/compiler-rt/lib/lsan/lsan_allocator.cc b/compiler-rt/lib/lsan/lsan_allocator.cc
index b867643..f54e953 100644
--- a/compiler-rt/lib/lsan/lsan_allocator.cc
+++ b/compiler-rt/lib/lsan/lsan_allocator.cc
@@ -135,7 +135,7 @@
 
 void *lsan_calloc(uptr nmemb, uptr size, const StackTrace &stack) {
   size *= nmemb;
-  return Allocate(stack, size, 1, true /**/);
+  return Allocate(stack, size, 1, true);
 }
 
 void *lsan_valloc(uptr size, const StackTrace &stack) {
diff --git a/compiler-rt/lib/lsan/lsan_interceptors.cc b/compiler-rt/lib/lsan/lsan_interceptors.cc
index b6ac7b7..49ccb33 100644
--- a/compiler-rt/lib/lsan/lsan_interceptors.cc
+++ b/compiler-rt/lib/lsan/lsan_interceptors.cc
@@ -70,7 +70,7 @@
     CHECK(allocated < kCallocPoolSize);
     return mem;
   }
-  if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return nullptr;
+  if (CheckForCallocOverflow(size, nmemb)) return nullptr;
   ENSURE_LSAN_INITED;
   GET_STACK_TRACE_MALLOC;
   return lsan_calloc(nmemb, size, stack);
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp
index a2a3c8b..00fa192 100644
--- a/compiler-rt/lib/scudo/scudo_allocator.cpp
+++ b/compiler-rt/lib/scudo/scudo_allocator.cpp
@@ -580,8 +580,7 @@
 
   void *calloc(uptr NMemB, uptr Size) {
     initThreadMaybe();
-    // TODO(kostyak): switch to CheckForCallocOverflow once D34799 lands.
-    if (CallocShouldReturnNullDueToOverflow(NMemB, Size))
+    if (CheckForCallocOverflow(NMemB, Size))
       return FailureHandler::OnBadRequest();
     return allocate(NMemB * Size, MinAlignment, FromMalloc, true);
   }