[PATCH] D35154: [tsan] Add a max VM address check for Darwin/AArch64
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 9 06:14:45 PDT 2017
kubamracek created this revision.
kubamracek added a project: Sanitizers.
Herald added subscribers: kristof.beyls, rengolin, aemerson.
Repository:
rL LLVM
https://reviews.llvm.org/D35154
Files:
lib/tsan/rtl/tsan_platform_mac.cc
Index: lib/tsan/rtl/tsan_platform_mac.cc
===================================================================
--- lib/tsan/rtl/tsan_platform_mac.cc
+++ lib/tsan/rtl/tsan_platform_mac.cc
@@ -230,6 +230,14 @@
#endif
void InitializePlatformEarly() {
+#if defined(__aarch64__)
+ uptr max_vm = GetMaxVirtualAddress() + 1;
+ if (max_vm > kHiAppMemEnd) {
+ CHECK(0 && "vm address limit too high");
+ } else if (max_vm < kHiAppMemEnd) {
+ CHECK(0 && "vm address limit too low");
+ }
+#endif
}
void InitializePlatform() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35154.105709.patch
Type: text/x-patch
Size: 530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170709/e4575d42/attachment-0001.bin>
More information about the llvm-commits
mailing list