[PATCH] D85378: Fix off-by-one error in size of the required shadow memory passed to `MapDynamicShadow`.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 11:58:04 PDT 2020


delcypher added a comment.

In D85378#2200349 <https://reviews.llvm.org/D85378#2200349>, @tejohnson wrote:

> In D85378#2198320 <https://reviews.llvm.org/D85378#2198320>, @delcypher wrote:
>
>> @tejohnson Looks like this bug is present on Linux too
>>
>>   uptr FindDynamicShadowStart() {
>>     uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd);
>>   #if ASAN_PREMAP_SHADOW          
>>     if (!PremapShadowFailed())
>>       return FindPremappedShadowStart(shadow_size_bytes);
>>   #endif 
>
> Thanks. Added @vitalybuka as reviewer since he may have a better understanding of the implications, I only just started looking at sanitizer code recently. Similar question to @yln - does this manifest now given the page size alignment? Could you fix the linux code as well?

I'll update the patch to try fix this in other places where this bug exists.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85378/new/

https://reviews.llvm.org/D85378



More information about the llvm-commits mailing list