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 | 8b225456c2d553d060fe7d9a8813af27b4a015f8 (patch) | |
tree | 0f43c570838260e4f2195eaa8c44d9f952637b5b | |
parent | 989513be94b51351bdd050c7f718ac36f8662b69 (diff) | |
download | bcm5719-llvm-8b225456c2d553d060fe7d9a8813af27b4a015f8.tar.gz bcm5719-llvm-8b225456c2d553d060fe7d9a8813af27b4a015f8.zip |
[tsan] Add a max VM address check for Darwin/AArch64
Differential Revision: https://reviews.llvm.org/D35154
llvm-svn: 307540
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc index a82bcd01bbf..e1ae0c02b84 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc +++ b/compiler-rt/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() { |