diff options
Diffstat (limited to 'contrib/compiler-rt/lib/msan/msan_new_delete.cc')
-rw-r--r-- | contrib/compiler-rt/lib/msan/msan_new_delete.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/compiler-rt/lib/msan/msan_new_delete.cc b/contrib/compiler-rt/lib/msan/msan_new_delete.cc index 5cc76e4bc08c..a0959aec5eb0 100644 --- a/contrib/compiler-rt/lib/msan/msan_new_delete.cc +++ b/contrib/compiler-rt/lib/msan/msan_new_delete.cc @@ -15,6 +15,7 @@ #include "msan.h" #include "interception/interception.h" #include "sanitizer_common/sanitizer_allocator.h" +#include "sanitizer_common/sanitizer_allocator_report.h" #if MSAN_REPLACE_OPERATORS_NEW_AND_DELETE @@ -33,12 +34,12 @@ namespace std { #define OPERATOR_NEW_BODY(nothrow) \ GET_MALLOC_STACK_TRACE; \ void *res = msan_malloc(size, &stack);\ - if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\ return res #define OPERATOR_NEW_BODY_ALIGN(nothrow) \ GET_MALLOC_STACK_TRACE;\ void *res = msan_memalign((uptr)align, size, &stack);\ - if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\ return res; INTERCEPTOR_ATTRIBUTE |