Skip to content

Commit

Permalink
[lsan] Enable LSan on PowerPC64.
Browse files Browse the repository at this point in the history
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

llvm-svn: 301048
  • Loading branch information
alekseyshl committed Apr 21, 2017
1 parent 9b9a535 commit 342586d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/lib/lsan/lsan_allocator.h
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion compiler-rt/lib/lsan/lsan_common.h
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions compiler-rt/test/lsan/lit.common.cfg
Expand Up @@ -67,8 +67,9 @@ config.substitutions.append( ("%clangxx ", build_invocation(clang_cxxflags)) )
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
Expand Down

0 comments on commit 342586d

Please sign in to comment.