PR rtl-optimization/87817
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_allocator_report.h
blob892f7ffb7f8f3a966f7b27965f5c68d89a556b52
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 //===----------------------------------------------------------------------===//
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