diff options
author | Max Ostapenko <m.ostapenko@partner.samsung.com> | 2015-11-23 11:07:18 +0200 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2015-11-23 11:07:18 +0200 |
commit | 55aea9f56ccbdd0e225d4899024efd7b2b9f95b2 (patch) | |
tree | b49fa5302e995c5559c7cb481c5eb8b9d3b42c08 /libsanitizer/lsan | |
parent | 096b85f4b4ad0578059d4c3c6ac1c6c330abb3fb (diff) | |
download | gcc-55aea9f56ccbdd0e225d4899024efd7b2b9f95b2.tar.gz |
libsanitizer merge from upstream r253555.
libsanitizer/
2015-11-23 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* All source files: Merge from upstream r253555.
* configure.tgt: Enable LSan on aarch64-*-linux* targets. Add new
dependences for TSan for aarch64-*-linux* targets.
* tsan/Makefile.am: Add new source files.
* configure: Regenerate.
* tsan/Makefile.in: Likewise.
From-SVN: r230739
Diffstat (limited to 'libsanitizer/lsan')
-rw-r--r-- | libsanitizer/lsan/lsan_allocator.cc | 2 | ||||
-rw-r--r-- | libsanitizer/lsan/lsan_common.cc | 4 | ||||
-rw-r--r-- | libsanitizer/lsan/lsan_common.h | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/libsanitizer/lsan/lsan_allocator.cc b/libsanitizer/lsan/lsan_allocator.cc index 486305bcc76..22b5f7e1a4a 100644 --- a/libsanitizer/lsan/lsan_allocator.cc +++ b/libsanitizer/lsan/lsan_allocator.cc @@ -30,7 +30,7 @@ struct ChunkMetadata { u32 stack_trace_id; }; -#if defined(__mips64) +#if defined(__mips64) || defined(__aarch64__) static const uptr kMaxAllowedMallocSize = 4UL << 30; static const uptr kRegionSizeLog = 20; static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; diff --git a/libsanitizer/lsan/lsan_common.cc b/libsanitizer/lsan/lsan_common.cc index 7efbf600da2..6d674c5e437 100644 --- a/libsanitizer/lsan/lsan_common.cc +++ b/libsanitizer/lsan/lsan_common.cc @@ -117,6 +117,10 @@ static inline bool CanBeAHeapPointer(uptr p) { return ((p >> 47) == 0); #elif defined(__mips64) return ((p >> 40) == 0); +#elif defined(__aarch64__) + unsigned runtimeVMA = + (MostSignificantSetBitIndex(GET_CURRENT_FRAME()) + 1); + return ((p >> runtimeVMA) == 0); #else return true; #endif diff --git a/libsanitizer/lsan/lsan_common.h b/libsanitizer/lsan/lsan_common.h index 786a53b69f0..b415567e7f3 100644 --- a/libsanitizer/lsan/lsan_common.h +++ b/libsanitizer/lsan/lsan_common.h @@ -20,8 +20,8 @@ #include "sanitizer_common/sanitizer_stoptheworld.h" #include "sanitizer_common/sanitizer_symbolizer.h" -#if SANITIZER_LINUX && (defined(__x86_64__) || defined(__mips64)) \ - && (SANITIZER_WORDSIZE == 64) +#if (SANITIZER_LINUX && !SANITIZER_ANDROID) && (SANITIZER_WORDSIZE == 64) \ + && (defined(__x86_64__) || defined(__mips64) || defined(__aarch64__)) #define CAN_SANITIZE_LEAKS 1 #else #define CAN_SANITIZE_LEAKS 0 |