[PATCH] D69765: [compiler-rt] Support more CPUs in LSan Allocator Address Space

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 3 08:19:36 PST 2019


krytarowski created this revision.
krytarowski added reviewers: joerg, mgorny, vitalybuka, kcc.
krytarowski added a project: Sanitizers.
Herald added subscribers: llvm-commits, atanasyan, fedor.sergeev, arichardson, dberris, sdardis, jyknight.
Herald added a project: LLVM.

Handle more CPU modes of: m68k, hppa, sh3, vax, mips, sparc, ppc, alpha.

These modes are requires for NetBSD (and typically LSan/GCC).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69765

Files:
  compiler-rt/lib/lsan/lsan_allocator.h


Index: compiler-rt/lib/lsan/lsan_allocator.h
===================================================================
--- compiler-rt/lib/lsan/lsan_allocator.h
+++ compiler-rt/lib/lsan/lsan_allocator.h
@@ -50,7 +50,11 @@
 };
 
 #if defined(__mips64) || defined(__aarch64__) || defined(__i386__) || \
-    defined(__arm__)
+    defined(__arm__) || defined(__m68k__) || defined(__hppa__) ||     \
+    defined(__sh3__) || defined(__vax__) ||                           \
+    (defined(__mips64) && !defined(_LP64)) ||                         \
+    (defined(__sparc__) && !defined(_LP64)) ||                        \
+    (defined(__powerpc__) && !defined(_LP64))
 template <typename AddressSpaceViewTy>
 struct AP32 {
   static const uptr kSpaceBeg = 0;
@@ -65,7 +69,8 @@
 template <typename AddressSpaceView>
 using PrimaryAllocatorASVT = SizeClassAllocator32<AP32<AddressSpaceView>>;
 using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
-#elif defined(__x86_64__) || defined(__powerpc64__)
+#elif defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || \
+    defined(__alpha__) || (defined(__mips64) && defined(_LP64))
 # if defined(__powerpc64__)
 const uptr kAllocatorSpace = 0xa0000000000ULL;
 const uptr kAllocatorSize  = 0x20000000000ULL;  // 2T.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69765.227615.patch
Type: text/x-patch
Size: 1283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191103/f65b6b53/attachment.bin>


More information about the llvm-commits mailing list