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 20namespace __sanitizer { 21 22void NORETURN ReportCallocOverflow(uptr count, uptr size, 23 const StackTrace *stack); 24void NORETURN ReportReallocArrayOverflow(uptr count, uptr size, 25 const StackTrace *stack); 26void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack); 27void NORETURN ReportInvalidAllocationAlignment(uptr alignment, 28 const StackTrace *stack); 29void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment, 30 const StackTrace *stack); 31void NORETURN ReportInvalidPosixMemalignAlignment(uptr alignment, 32 const StackTrace *stack); 33void NORETURN ReportAllocationSizeTooBig(uptr user_size, uptr max_size, 34 const StackTrace *stack); 35void NORETURN ReportOutOfMemory(uptr requested_size, const StackTrace *stack); 36 37} // namespace __sanitizer 38 39#endif // SANITIZER_ALLOCATOR_REPORT_H 40