summaryrefslogtreecommitdiff
path: root/lib/lsan
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-04-21 21:59:53 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-04-21 21:59:53 +0000
commitbed4c80fce1fa61c55bb53fc7338cf628655fe1d (patch)
treeb80299f8d9090950a16853bfb68d35cafcebc12e /lib/lsan
parentba68c62d8b58b511859fd87a2b870e4a18e9b3b1 (diff)
[lsan] Enable LSan on PowerPC64.
Summary: Re-landing reverted D31995 with suppressions defined in D32303 and D32377. Reviewers: eugenis Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D32379 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan')
-rw-r--r--lib/lsan/lsan_allocator.h2
-rw-r--r--lib/lsan/lsan_common.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/lsan/lsan_allocator.h b/lib/lsan/lsan_allocator.h
index e5def17d4..fad5adb01 100644
--- a/lib/lsan/lsan_allocator.h
+++ b/lib/lsan/lsan_allocator.h
@@ -59,7 +59,7 @@ typedef CompactSizeClassMap SizeClassMap;
typedef SizeClassAllocator32<0, SANITIZER_MMAP_RANGE_SIZE,
sizeof(ChunkMetadata), SizeClassMap, kRegionSizeLog, ByteMap>
PrimaryAllocator;
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__powerpc64__)
struct AP64 { // Allocator64 parameters. Deliberately using a short name.
static const uptr kSpaceBeg = 0x600000000000ULL;
static const uptr kSpaceSize = 0x40000000000ULL; // 4T.
diff --git a/lib/lsan/lsan_common.h b/lib/lsan/lsan_common.h
index 121b9c082..beb31d6f4 100644
--- a/lib/lsan/lsan_common.h
+++ b/lib/lsan/lsan_common.h
@@ -32,7 +32,8 @@
// new architecture inside sanitizer library.
#if (SANITIZER_LINUX && !SANITIZER_ANDROID || SANITIZER_MAC) && \
(SANITIZER_WORDSIZE == 64) && \
- (defined(__x86_64__) || defined(__mips64) || defined(__aarch64__))
+ (defined(__x86_64__) || defined(__mips64) || defined(__aarch64__) || \
+ defined(__powerpc64__))
#define CAN_SANITIZE_LEAKS 1
#elif defined(__i386__) && \
(SANITIZER_LINUX && !SANITIZER_ANDROID || SANITIZER_MAC)