[compiler-rt] r331648 - [sanitizer] On RTEMS, avoid recursion when reporting Mmap failure
Walter Lee via llvm-commits
llvm-commits at lists.llvm.org
Mon May 7 09:38:46 PDT 2018
Author: waltl
Date: Mon May 7 09:38:45 2018
New Revision: 331648
URL: http://llvm.org/viewvc/llvm-project?rev=331648&view=rev
Log:
[sanitizer] On RTEMS, avoid recursion when reporting Mmap failure
Differential Revision: https://reviews.llvm.org/D46463
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc?rev=331648&r1=331647&r2=331648&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc Mon May 7 09:38:45 2018
@@ -38,9 +38,10 @@ void NORETURN ReportMmapFailureAndDie(up
const char *mmap_type, error_t err,
bool raw_report) {
static int recursion_count;
- if (raw_report || recursion_count) {
- // If raw report is requested or we went into recursion, just die.
- // The Report() and CHECK calls below may call mmap recursively and fail.
+ if (SANITIZER_RTEMS || raw_report || recursion_count) {
+ // If we are on RTEMS or raw report is requested or we went into recursion,
+ // just die. The Report() and CHECK calls below may call mmap recursively
+ // and fail.
RawWrite("ERROR: Failed to mmap\n");
Die();
}
More information about the llvm-commits
mailing list