brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 6e4e6b1 Raw
41 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// Shared allocator error reporting for ThreadSanitizer, MemorySanitizer, etc.11///12//===----------------------------------------------------------------------===//13 14#ifndef SANITIZER_ALLOCATOR_REPORT_H15#define SANITIZER_ALLOCATOR_REPORT_H16 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);36void NORETURN ReportRssLimitExceeded(const StackTrace *stack);37 38}  // namespace __sanitizer39 40#endif  // SANITIZER_ALLOCATOR_REPORT_H41