1 //===-- sanitizer_allocator_report.h ----------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
9 /// Shared allocator error reporting for ThreadSanitizer, MemorySanitizer, etc.
11 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_ALLOCATOR_REPORT_H
14 #define SANITIZER_ALLOCATOR_REPORT_H
16 #include "sanitizer_internal_defs.h"
17 #include "sanitizer_stacktrace.h"
19 namespace __sanitizer
{
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
);
34 } // namespace __sanitizer
36 #endif // SANITIZER_ALLOCATOR_REPORT_H