[PATCH] D39888: [Sanitizers, LSan, Darwin] Allow for lack of VM_MEMORY_OS_ALLOC_ONCE
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 13 06:45:21 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL322437: [Sanitizers, LSan, Darwin] Allow for lack of VM_MEMORY_OS_ALLOC_ONCE (authored by fjricci, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D39888?vs=129638&id=129761#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39888
Files:
compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
Index: compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
===================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
+++ compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
@@ -24,6 +24,13 @@
#include <mach/mach.h>
+// Only introduced in Mac OS X 10.9.
+#ifdef VM_MEMORY_OS_ALLOC_ONCE
+static const int kSanitizerVmMemoryOsAllocOnce = VM_MEMORY_OS_ALLOC_ONCE;
+#else
+static const int kSanitizerVmMemoryOsAllocOnce = 73;
+#endif
+
namespace __lsan {
typedef struct {
@@ -157,7 +164,7 @@
// libxpc stashes some pointers in the Kernel Alloc Once page,
// make sure not to report those as leaks.
- if (info.user_tag == VM_MEMORY_OS_ALLOC_ONCE) {
+ if (info.user_tag == kSanitizerVmMemoryOsAllocOnce) {
ScanRangeForPointers(address, end_address, frontier, "GLOBAL",
kReachable);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39888.129761.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180113/cdacc0c2/attachment.bin>
More information about the llvm-commits
mailing list