diff options
author | Alex Shlyapnikov <alekseys@google.com> | 2017-06-29 21:54:38 +0000 |
---|---|---|
committer | Alex Shlyapnikov <alekseys@google.com> | 2017-06-29 21:54:38 +0000 |
commit | 346988bf029c5cd1cf57a39442215a912b34d056 (patch) | |
tree | 3691539a8c6e0d9c9bae3702b50f97ec4fa3b1c0 /compiler-rt/lib/scudo/scudo_allocator.cpp | |
parent | cb823f6a1911f8516e6e04830e28c2d4dec61c8d (diff) | |
download | bcm5719-llvm-346988bf029c5cd1cf57a39442215a912b34d056.tar.gz bcm5719-llvm-346988bf029c5cd1cf57a39442215a912b34d056.zip |
Merge
llvm-svn: 306748
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_allocator.cpp')
-rw-r--r-- | compiler-rt/lib/scudo/scudo_allocator.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp index a2a3c8ba339..00fa192181a 100644 --- a/compiler-rt/lib/scudo/scudo_allocator.cpp +++ b/compiler-rt/lib/scudo/scudo_allocator.cpp @@ -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); } |