| 1 |
//===-- sanitizer_allocator_report.h ----------------------------*- C++ -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
/// |
| 9 |
/// \file |
| 10 |
/// Shared allocator error reporting for ThreadSanitizer, MemorySanitizer, etc. |
| 11 |
/// |
| 12 |
//===----------------------------------------------------------------------===// |
| 13 |
|
| 14 |
#ifndef SANITIZER_ALLOCATOR_REPORT_H |
| 15 |
#define SANITIZER_ALLOCATOR_REPORT_H |
| 16 |
|
| 17 |
#include "sanitizer_internal_defs.h" |
| 18 |
#include "sanitizer_stacktrace.h" |
| 19 |
|
| 20 |
namespace __sanitizer { |
| 21 |
|
| 22 |
void NORETURN ReportCallocOverflow(uptr count, uptr size, |
| 23 |
const StackTrace *stack); |
| 24 |
void NORETURN ReportReallocArrayOverflow(uptr count, uptr size, |
| 25 |
const StackTrace *stack); |
| 26 |
void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack); |
| 27 |
void NORETURN ReportInvalidAllocationAlignment(uptr alignment, |
| 28 |
const StackTrace *stack); |
| 29 |
void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment, |
| 30 |
const StackTrace *stack); |
| 31 |
void NORETURN ReportInvalidPosixMemalignAlignment(uptr alignment, |
| 32 |
const StackTrace *stack); |
| 33 |
void NORETURN ReportAllocationSizeTooBig(uptr user_size, uptr max_size, |
| 34 |
const StackTrace *stack); |
| 35 |
void NORETURN ReportOutOfMemory(uptr requested_size, const StackTrace *stack); |
| 36 |
void NORETURN ReportRssLimitExceeded(const StackTrace *stack); |
| 37 |
|
| 38 |
} // namespace __sanitizer |
| 39 |
|
| 40 |
#endif // SANITIZER_ALLOCATOR_REPORT_H |