[PATCH] D35098: [asan] For iOS/AArch64, if the dynamic shadow doesn't fit, restrict the VM space
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 14:54:21 PDT 2017
eugenis added inline comments.
================
Comment at: lib/asan/asan_mac.cc:70
+ // Round down to multiplies of 1 MB.
+ uptr new_max_vm = RoundDownTo(largest_gap_found << SHADOW_SCALE, 0x100000);
+ RestrictMemoryToMaxAddress(new_max_vm);
----------------
eugenis wrote:
> alekseyshl wrote:
> > kubamracek wrote:
> > > alekseyshl wrote:
> > > > Why to 1 MB? Is it a Mac requirement?
> > > Not really, this is purely for convenience and debugging - it's nice to see the memory map nicely aligned. I can drop this (but we'll still need to round down to at least 8*PAGE_SIZE, maybe more).
> > No, it's fine, just add a comment that it is arbitrary and purely for the debugging convenience.
> Why does it have to be aligned to 8*PAGE_SIZE?
>
No matter, I got it. Sorry for the stupid question.
Repository:
rL LLVM
https://reviews.llvm.org/D35098
More information about the llvm-commits
mailing list