[sanitizer] When setting up shadow memory on iOS, fix handling the return value of...
authorKuba Mracek <mracek@apple.com>
Fri, 17 Aug 2018 17:53:14 +0000 (17:53 +0000)
committerKuba Mracek <mracek@apple.com>
Fri, 17 Aug 2018 17:53:14 +0000 (17:53 +0000)
commit2b93dfe0adeb83c7c025b0d6ac7b44156fa90088
tree05a4e48afefd5b317ceca94754f4bf26160a4dc0
parent94ff57f5b182e7978dce94d83310ecfac2445abb
[sanitizer] When setting up shadow memory on iOS, fix handling the return value of task_info on older OS versions

task_vm_info is a "revisioned" structure, new OS versions add fields to the end, and compatibility is based on the reported size. On older OS versions, min_address/max_address is not filled back. Let's handle that case. Unfortunately, we can't really write a test (as the failure only happens when on a specific OS version).

Differential Revision: https://reviews.llvm.org/D50275

llvm-svn: 340058
compiler-rt/lib/sanitizer_common/sanitizer_mac.cc