1*5f757f3fSDimitry Andric //===-- report_linux.h ------------------------------------------*- C++ -*-===// 2*5f757f3fSDimitry Andric // 3*5f757f3fSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*5f757f3fSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*5f757f3fSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*5f757f3fSDimitry Andric // 7*5f757f3fSDimitry Andric //===----------------------------------------------------------------------===// 8*5f757f3fSDimitry Andric 9*5f757f3fSDimitry Andric #ifndef SCUDO_REPORT_LINUX_H_ 10*5f757f3fSDimitry Andric #define SCUDO_REPORT_LINUX_H_ 11*5f757f3fSDimitry Andric 12*5f757f3fSDimitry Andric #include "platform.h" 13*5f757f3fSDimitry Andric 14*5f757f3fSDimitry Andric #if SCUDO_LINUX || SCUDO_TRUSTY 15*5f757f3fSDimitry Andric 16*5f757f3fSDimitry Andric #include "internal_defs.h" 17*5f757f3fSDimitry Andric 18*5f757f3fSDimitry Andric namespace scudo { 19*5f757f3fSDimitry Andric 20*5f757f3fSDimitry Andric // Report a fatal error when a map call fails. SizeIfOOM shall 21*5f757f3fSDimitry Andric // hold the requested size on an out-of-memory error, 0 otherwise. 22*5f757f3fSDimitry Andric void NORETURN reportMapError(uptr SizeIfOOM = 0); 23*5f757f3fSDimitry Andric 24*5f757f3fSDimitry Andric // Report a fatal error when an unmap call fails. 25*5f757f3fSDimitry Andric void NORETURN reportUnmapError(uptr Addr, uptr Size); 26*5f757f3fSDimitry Andric 27*5f757f3fSDimitry Andric // Report a fatal error when a mprotect call fails. 28*5f757f3fSDimitry Andric void NORETURN reportProtectError(uptr Addr, uptr Size, int Prot); 29*5f757f3fSDimitry Andric 30*5f757f3fSDimitry Andric } // namespace scudo 31*5f757f3fSDimitry Andric 32*5f757f3fSDimitry Andric #endif // SCUDO_LINUX || SCUDO_TRUSTY 33*5f757f3fSDimitry Andric 34*5f757f3fSDimitry Andric #endif // SCUDO_REPORT_LINUX_H_ 35