diff options
author | Kuba Mracek <mracek@apple.com> | 2017-07-10 15:24:48 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2017-07-10 15:24:48 +0000 |
commit | 7b20e2670faf41e2b94d9b8481b865e7068bf712 (patch) | |
tree | 7af6b3d633099c38cd29901e619afa437b48a5e7 | |
parent | 9a72e30d6a3c9a227c3ee01699056bfab87ac713 (diff) |
[tsan] Add a max VM address check for Darwin/AArch64
Differential Revision: https://reviews.llvm.org/D35154
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307540 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/tsan/rtl/tsan_platform_mac.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_platform_mac.cc b/lib/tsan/rtl/tsan_platform_mac.cc index a82bcd01b..e1ae0c02b 100644 --- a/lib/tsan/rtl/tsan_platform_mac.cc +++ b/lib/tsan/rtl/tsan_platform_mac.cc @@ -230,6 +230,14 @@ static void my_pthread_introspection_hook(unsigned int event, pthread_t thread, #endif void InitializePlatformEarly() { +#if defined(__aarch64__) + uptr max_vm = GetMaxVirtualAddress() + 1; + if (max_vm != kHiAppMemEnd) { + Printf("ThreadSanitizer: unsupported vm address limit %p, expected %p.\n", + max_vm, kHiAppMemEnd); + Die(); + } +#endif } void InitializePlatform() { |