35 lines · c
1//===-- report_linux.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#ifndef SCUDO_REPORT_LINUX_H_10#define SCUDO_REPORT_LINUX_H_11 12#include "platform.h"13 14#if SCUDO_LINUX || SCUDO_TRUSTY15 16#include "internal_defs.h"17 18namespace scudo {19 20// Report a fatal error when a map call fails. SizeIfOOM shall21// hold the requested size on an out-of-memory error, 0 otherwise.22void NORETURN reportMapError(uptr SizeIfOOM = 0);23 24// Report a fatal error when an unmap call fails.25void NORETURN reportUnmapError(uptr Addr, uptr Size);26 27// Report a fatal error when a mprotect call fails.28void NORETURN reportProtectError(uptr Addr, uptr Size, int Prot);29 30} // namespace scudo31 32#endif // SCUDO_LINUX || SCUDO_TRUSTY33 34#endif // SCUDO_REPORT_LINUX_H_35