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).
Details
Details
- Reviewers
george.karpenkov delcypher - Commits
- rG2b93dfe0adeb: [sanitizer] When setting up shadow memory on iOS, fix handling the return value…
rCRT340058: [sanitizer] When setting up shadow memory on iOS, fix handling the return value…
rL340058: [sanitizer] When setting up shadow memory on iOS, fix handling the return value…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/sanitizer_common/sanitizer_mac.cc | ||
---|---|---|
893 ↗ | (On Diff #159102) | It looks like you're relying on task_vm_info being initialised to zero because presumably on older platforms task_info(...) will use a different task_vm_info layout that probably has less fields. It looks like that's what = {}; does but it wasn't immediately obvious to me that this was calling a synthesised constructor that initialized everything to zero. Could you add a comment about zero initialization? Other than that LGTM. |