report_linux.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef SCUDO_REPORT_LINUX_H_
  9. #define SCUDO_REPORT_LINUX_H_
  10. #include "platform.h"
  11. #if SCUDO_LINUX || SCUDO_TRUSTY
  12. #include "internal_defs.h"
  13. namespace scudo {
  14. // Report a fatal error when a map call fails. SizeIfOOM shall
  15. // hold the requested size on an out-of-memory error, 0 otherwise.
  16. void NORETURN reportMapError(uptr SizeIfOOM = 0);
  17. // Report a fatal error when an unmap call fails.
  18. void NORETURN reportUnmapError(uptr Addr, uptr Size);
  19. // Report a fatal error when a mprotect call fails.
  20. void NORETURN reportProtectError(uptr Addr, uptr Size, int Prot);
  21. } // namespace scudo
  22. #endif // SCUDO_LINUX || SCUDO_TRUSTY
  23. #endif // SCUDO_REPORT_LINUX_H_