1 //===-- sanitizer_allocator_report.h ----------------------------*- C++ -*-===// 2 // 3 // This file is distributed under the University of Illinois Open Source 4 // License. See LICENSE.TXT for details. 5 // 6 //===----------------------------------------------------------------------===// 7 /// 8 /// \file 9 /// Shared allocator error reporting for ThreadSanitizer, MemorySanitizer, etc. 10 /// 11 //===----------------------------------------------------------------------===// 12 13 #ifndef SANITIZER_ALLOCATOR_REPORT_H 14 #define SANITIZER_ALLOCATOR_REPORT_H 15 16 #include "sanitizer_internal_defs.h" 17 #include "sanitizer_stacktrace.h" 18 19 namespace __sanitizer { 20 21 void NORETURN ReportCallocOverflow(uptr count, uptr size, 22 const StackTrace *stack); 23 void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack); 24 void NORETURN ReportInvalidAllocationAlignment(uptr alignment, 25 const StackTrace *stack); 26 void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment, 27 const StackTrace *stack); 28 void NORETURN ReportInvalidPosixMemalignAlignment(uptr alignment, 29 const StackTrace *stack); 30 void NORETURN ReportAllocationSizeTooBig(uptr user_size, uptr max_size, 31 const StackTrace *stack); 32 void NORETURN ReportOutOfMemory(uptr requested_size, const StackTrace *stack); 33 34 } // namespace __sanitizer 35 36 #endif // SANITIZER_ALLOCATOR_REPORT_H 37