[PATCH] D46463: [sanitizer] On RTEMS, avoid recursion when reporting Mmap failure

Walter Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 09:42:30 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL331648: [sanitizer] On RTEMS, avoid recursion when reporting Mmap failure (authored by waltl, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D46463?vs=145280&id=145489#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46463

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
@@ -38,9 +38,10 @@
                                       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();
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46463.145489.patch
Type: text/x-patch
Size: 931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180507/7b5493bf/attachment-0001.bin>


More information about the llvm-commits mailing list