[PATCH] D46461: [asan] Set flags appropriately for RTEMS

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rL331647: [asan] Set flags appropriately for RTEMS (authored by waltl, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D46461?vs=145278&id=145488#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46461

Files:
  compiler-rt/trunk/lib/asan/asan_flags.cc
  compiler-rt/trunk/lib/asan/asan_flags.inc


Index: compiler-rt/trunk/lib/asan/asan_flags.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_flags.cc
+++ compiler-rt/trunk/lib/asan/asan_flags.cc
@@ -160,6 +160,10 @@
   CHECK_LE(f->max_redzone, 2048);
   CHECK(IsPowerOfTwo(f->redzone));
   CHECK(IsPowerOfTwo(f->max_redzone));
+  if (SANITIZER_RTEMS) {
+    CHECK(!f->unmap_shadow_on_exit);
+    CHECK(!f->protect_shadow_gap);
+  }
 
   // quarantine_size is deprecated but we still honor it.
   // quarantine_size can not be used together with quarantine_size_mb.
Index: compiler-rt/trunk/lib/asan/asan_flags.inc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_flags.inc
+++ compiler-rt/trunk/lib/asan/asan_flags.inc
@@ -86,9 +86,10 @@
 ASAN_FLAG(bool, check_malloc_usable_size, true,
           "Allows the users to work around the bug in Nvidia drivers prior to "
           "295.*.")
-ASAN_FLAG(bool, unmap_shadow_on_exit, false,
+ASAN_FLAG(bool, unmap_shadow_on_exit, !SANITIZER_RTEMS,
           "If set, explicitly unmaps the (huge) shadow at exit.")
-ASAN_FLAG(bool, protect_shadow_gap, true, "If set, mprotect the shadow gap")
+ASAN_FLAG(bool, protect_shadow_gap, !SANITIZER_RTEMS,
+          "If set, mprotect the shadow gap")
 ASAN_FLAG(bool, print_stats, false,
           "Print various statistics after printing an error message or if "
           "atexit=1.")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46461.145488.patch
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180507/89a43252/attachment.bin>


More information about the llvm-commits mailing list