[PATCH] D32379: [lsan] Enable LSan on PowerPC64.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 15:12:41 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301048: [lsan] Enable LSan on PowerPC64. (authored by alekseyshl).
Changed prior to commit:
https://reviews.llvm.org/D32379?vs=96242&id=96244#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32379
Files:
compiler-rt/trunk/lib/lsan/lsan_allocator.h
compiler-rt/trunk/lib/lsan/lsan_common.h
compiler-rt/trunk/test/lsan/lit.common.cfg
Index: compiler-rt/trunk/test/lsan/lit.common.cfg
===================================================================
--- compiler-rt/trunk/test/lsan/lit.common.cfg
+++ compiler-rt/trunk/test/lsan/lit.common.cfg
@@ -67,8 +67,9 @@
config.substitutions.append( ("%clang_lsan ", build_invocation(clang_lsan_cflags)) )
config.substitutions.append( ("%clangxx_lsan ", build_invocation(clang_lsan_cxxflags)) )
-# LeakSanitizer tests are currently supported on x86-64 Linux, arm Linux, and mips64 Linux only.
-if config.host_os not in ['Linux'] or config.host_arch not in ['x86_64', 'mips64', 'arm', 'armhf', 'armv7l']:
+# LeakSanitizer tests are currently supported on x86-64 Linux, PowerPC64 Linux, arm Linux, and mips64 Linux only.
+supported_linux = config.host_os is 'Linux' and config.host_arch in ['x86_64', 'ppc64', 'mips64', 'arm', 'armhf', 'armv7l']
+if not (supported_linux):
config.unsupported = True
# Don't support Thumb due to broken fast unwinder
Index: compiler-rt/trunk/lib/lsan/lsan_common.h
===================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.h
+++ compiler-rt/trunk/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)
Index: compiler-rt/trunk/lib/lsan/lsan_allocator.h
===================================================================
--- compiler-rt/trunk/lib/lsan/lsan_allocator.h
+++ compiler-rt/trunk/lib/lsan/lsan_allocator.h
@@ -59,7 +59,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32379.96244.patch
Type: text/x-patch
Size: 2322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/591c8de1/attachment.bin>
More information about the llvm-commits
mailing list