diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2018-04-13 19:21:27 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2018-04-13 19:21:27 +0000 |
| commit | 4563b78b99f8677eccf839a852bc10ab2fdfc9b6 (patch) | |
| tree | 6db18ca7c9383443085d703f0686ca8a6f428d86 /compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h | |
| parent | 3ede11b58cf5e71ce8a9e664587ee01325365ff4 (diff) | |
| download | bcm5719-llvm-4563b78b99f8677eccf839a852bc10ab2fdfc9b6.tar.gz bcm5719-llvm-4563b78b99f8677eccf839a852bc10ab2fdfc9b6.zip | |
[sanitizer] Allow for the allocator "names" to be set by the tools
Summary:
In the same spirit of SanitizerToolName, allow the Primary & Secondary
allocators to have names that can be set by the tools via PrimaryAllocatorName
and SecondaryAllocatorName.
Additionally, set a non-default name for Scudo.
Reviewers: alekseyshl, vitalybuka
Reviewed By: alekseyshl, vitalybuka
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D45600
llvm-svn: 330055
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h index cb84e8fe686..a67d70dcc51 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h @@ -34,7 +34,7 @@ class LargeMmapAllocatorPtrArrayDynamic { public: INLINE void *Init() { uptr p = address_range_.Init(kMaxNumChunks * sizeof(uptr), - "sanitizer_large_allocator"); + SecondaryAllocatorName); CHECK(p); return reinterpret_cast<void*>(p); } @@ -94,7 +94,7 @@ class LargeMmapAllocator { return nullptr; } uptr map_beg = reinterpret_cast<uptr>( - MmapOrDieOnFatalError(map_size, "LargeMmapAllocator")); + MmapOrDieOnFatalError(map_size, SecondaryAllocatorName)); if (!map_beg) return nullptr; CHECK(IsAligned(map_beg, page_size_)); |

