[compiler-rt] r307408 - Fix-up for r307307: vm_info.max_address is the first non-addressable pointer, so we need to subtract one.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 7 08:32:44 PDT 2017
Author: kuba.brecka
Date: Fri Jul 7 08:32:44 2017
New Revision: 307408
URL: http://llvm.org/viewvc/llvm-project?rev=307408&view=rev
Log:
Fix-up for r307307: vm_info.max_address is the first non-addressable pointer, so we need to subtract one.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=307408&r1=307407&r2=307408&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Fri Jul 7 08:32:44 2017
@@ -815,7 +815,7 @@ uptr GetTaskInfoMaxAddress() {
mach_msg_type_number_t count = sizeof(vm_info) / sizeof(int);
int err = task_info(mach_task_self(), TASK_VM_INFO, (int *)&vm_info, &count);
if (err == 0) {
- return vm_info.max_address;
+ return vm_info.max_address - 1;
} else {
// xnu cannot provide vm address limit
return 0x200000000 - 1;
More information about the llvm-commits
mailing list