]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.h
Merge llvm trunk r351319, resolve conflicts, and update FREEBSD-Xlist.
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / sanitizer_common / sanitizer_allocator_report.h
1 //===-- sanitizer_allocator_report.h ----------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// Shared allocator error reporting for ThreadSanitizer, MemorySanitizer, etc.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef SANITIZER_ALLOCATOR_REPORT_H
16 #define SANITIZER_ALLOCATOR_REPORT_H
17
18 #include "sanitizer_internal_defs.h"
19 #include "sanitizer_stacktrace.h"
20
21 namespace __sanitizer {
22
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);
35
36 }  // namespace __sanitizer
37
38 #endif  // SANITIZER_ALLOCATOR_REPORT_H