diff options
author | Kuba Mracek <mracek@apple.com> | 2017-07-07 15:32:44 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2017-07-07 15:32:44 +0000 |
commit | 922a96fd9fec952be515a42b5e3ed608d093fa11 (patch) | |
tree | b86577112cc2a791894ed2475876f4af39c90733 /lib/sanitizer_common/sanitizer_mac.cc | |
parent | 9e2c69ffc25e56881e2a4805ac765110dec265dc (diff) |
Fix-up for r307307: vm_info.max_address is the first non-addressable pointer, so we need to subtract one.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_mac.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_mac.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_mac.cc b/lib/sanitizer_common/sanitizer_mac.cc index 8a8fc9663..d6e61f207 100644 --- a/lib/sanitizer_common/sanitizer_mac.cc +++ b/lib/sanitizer_common/sanitizer_mac.cc @@ -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; |