[PATCH] [ASan] Use less shadow on Win 32-bit
Timur Iskhodzhanov
timurrrr at google.com
Tue Jul 16 01:39:26 PDT 2013
================
Comment at: lib/asan/asan_rtl.cc:334
@@ +333,3 @@
+ kHighMemEnd = kHighMemEnd | (GetPageSizeCached() - 1);
+ while (kHighMemBeg % GetPageSizeCached())
+ kHighMemEnd += GetPageSizeCached();
----------------
Timur Iskhodzhanov wrote:
> Alexey Samsonov wrote:
> > I don't understand this loop.
> That's covered by the above "make sure everything is fine" comment.
>
> Not only we want the kHighMemEnd to be page-aligned,
> we also want kHighMemBeg to be page-aligned in order to map shadow.
>
> Should I add this answer to the comment?
Ah, I see the confusion.
kHighMemBeg is defined as (drum roll please!)
#define kHighMemBeg (MEM_TO_SHADOW(kHighMemEnd) + 1)
so....
Thoughts?
How to explain that better?
http://llvm-reviews.chandlerc.com/D1139
More information about the llvm-commits
mailing list