[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 16 14:28:01 PDT 2018
MaskRay created this revision.
MaskRay added reviewers: dimitry, kcc.
Herald added subscribers: Sanitizers, llvm-commits, delcypher, kubamracek.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48257
Files:
lib/sanitizer_common/sanitizer_posix_libcdep.cc
Index: lib/sanitizer_common/sanitizer_posix_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_posix_libcdep.cc
+++ 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.151628.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180616/692c3e7f/attachment.bin>
More information about the llvm-commits
mailing list