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