summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan/msan_allocator.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-09-29 23:00:54 +0000
committerVitaly Buka <vitalybuka@google.com>2016-09-29 23:00:54 +0000
commit0ec5a2830dbb9143cba8fa69de4c8dee58e87891 (patch)
tree558068dafe5889910f2236154ef97d884576f17e /compiler-rt/lib/msan/msan_allocator.cc
parent27e610f9863b3e5e4df606864f51c7f9d2c71055 (diff)
downloadbcm5719-llvm-0ec5a2830dbb9143cba8fa69de4c8dee58e87891.tar.gz
bcm5719-llvm-0ec5a2830dbb9143cba8fa69de4c8dee58e87891.zip
Don't use internal symbolizer if we are in process of reporting Out-of-Memory.
Reviewed by eugenis offline, as reviews.llvm.org is down. llvm-svn: 282805
Diffstat (limited to 'compiler-rt/lib/msan/msan_allocator.cc')
-rw-r--r--compiler-rt/lib/msan/msan_allocator.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/msan/msan_allocator.cc b/compiler-rt/lib/msan/msan_allocator.cc
index 2b81efc3e3c..d41d5b62053 100644
--- a/compiler-rt/lib/msan/msan_allocator.cc
+++ b/compiler-rt/lib/msan/msan_allocator.cc
@@ -121,7 +121,7 @@ static void *MsanAllocate(StackTrace *stack, uptr size, uptr alignment,
if (size > kMaxAllowedMallocSize) {
Report("WARNING: MemorySanitizer failed to allocate %p bytes\n",
(void *)size);
- return allocator.ReturnNullOrDie();
+ return allocator.ReturnNullOrDieOnBadRequest();
}
MsanThread *t = GetCurrentThread();
void *allocated;
@@ -179,7 +179,7 @@ void MsanDeallocate(StackTrace *stack, void *p) {
void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) {
if (CallocShouldReturnNullDueToOverflow(size, nmemb))
- return allocator.ReturnNullOrDie();
+ return allocator.ReturnNullOrDieOnBadRequest();
return MsanReallocate(stack, nullptr, nmemb * size, sizeof(u64), true);
}
OpenPOWER on IntegriCloud