[PATCH] D41023: Add NetBSD/x86_64 mapping in MSan

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 16:28:28 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT320218: Add NetBSD/x86_64 mapping in MSan (authored by kamil).

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D41023

Files:
  lib/msan/msan.h
  lib/msan/msan_allocator.cc


Index: lib/msan/msan.h
===================================================================
--- lib/msan/msan.h
+++ lib/msan/msan.h
@@ -203,7 +203,7 @@
 #define MEM_TO_SHADOW(mem) (LINEARIZE_MEM((mem)) + 0x100000000000ULL)
 #define SHADOW_TO_ORIGIN(shadow) (((uptr)(shadow)) + 0x280000000000)
 
-#elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64
+#elif SANITIZER_NETBSD || (SANITIZER_LINUX && SANITIZER_WORDSIZE == 64)
 
 #ifdef MSAN_LINUX_X86_64_OLD_MAPPING
 // Requries PIE binary and ASLR enabled.
Index: lib/msan/msan_allocator.cc
===================================================================
--- lib/msan/msan_allocator.cc
+++ lib/msan/msan_allocator.cc
@@ -62,7 +62,8 @@
   };
   typedef SizeClassAllocator32<AP32> PrimaryAllocator;
 #elif defined(__x86_64__)
-#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)
+#if SANITIZER_NETBSD || \
+    (SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING))
   static const uptr kAllocatorSpace = 0x700000000000ULL;
 #else
   static const uptr kAllocatorSpace = 0x600000000000ULL;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41023.126232.patch
Type: text/x-patch
Size: 1051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171209/59b246c5/attachment.bin>


More information about the llvm-commits mailing list