[compiler-rt] r306748 - Merge
Alex Shlyapnikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 14:54:38 PDT 2017
Author: alekseyshl
Date: Thu Jun 29 14:54:38 2017
New Revision: 306748
URL: http://llvm.org/viewvc/llvm-project?rev=306748&view=rev
Log:
Merge
Modified:
compiler-rt/trunk/lib/lsan/lsan_allocator.cc
compiler-rt/trunk/lib/lsan/lsan_interceptors.cc
compiler-rt/trunk/lib/scudo/scudo_allocator.cpp
Modified: compiler-rt/trunk/lib/lsan/lsan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.cc?rev=306748&r1=306747&r2=306748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_allocator.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_allocator.cc Thu Jun 29 14:54:38 2017
@@ -135,7 +135,7 @@ void *lsan_realloc(void *p, uptr size, c
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) {
Modified: compiler-rt/trunk/lib/lsan/lsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_interceptors.cc?rev=306748&r1=306747&r2=306748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_interceptors.cc Thu Jun 29 14:54:38 2017
@@ -70,7 +70,7 @@ INTERCEPTOR(void*, calloc, uptr nmemb, u
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);
Modified: compiler-rt/trunk/lib/scudo/scudo_allocator.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_allocator.cpp?rev=306748&r1=306747&r2=306748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_allocator.cpp (original)
+++ compiler-rt/trunk/lib/scudo/scudo_allocator.cpp Thu Jun 29 14:54:38 2017
@@ -580,8 +580,7 @@ struct ScudoAllocator {
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);
}
More information about the llvm-commits
mailing list