[PATCH] D48257: [asan] Use MADV_NOCORE for use_madv_dontdump on FreeBSD.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 30 01:32:39 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336046: [asan] Use MADV_NOCORE for use_madv_dontdump on FreeBSD. (authored by MaskRay, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48257

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


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
@@ -78,8 +78,10 @@
 }
 
 bool DontDumpShadowMemory(uptr addr, uptr length) {
-#ifdef MADV_DONTDUMP
+#if defined(MADV_DONTDUMP)
   return madvise((void *)addr, length, MADV_DONTDUMP) == 0;
+#elif defined(MADV_NOCORE)
+  return madvise((void *)addr, length, MADV_NOCORE) == 0;
 #else
   return true;
 #endif  // MADV_DONTDUMP


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48257.153617.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180630/8655fde8/attachment.bin>


More information about the llvm-commits mailing list