[PATCH] D136197: [ASAN] Don't inline when -asan-max-inline-poisoning-size=0
Roy Sundahl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 11:42:41 PDT 2022
rsundahl added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:2897
uint8_t Val = ShadowBytes[i];
if (!AsanSetShadowFunc[Val])
continue;
----------------
kubamracek wrote:
> vitalybuka wrote:
> > assert(AsanSetShadowFunc[Val])?
> Sounds like a good idea... @rsundahl ?
It has to stay because it's a fallback if there isn't a function to call. While it's true that for -asan-mapping-scale=3, we have all the possibilities covered, we don't at higher scales. For example, we needed 0x08..0x0F for -asan-mapping-scale=4, 0x08..0x1F for -asan-mapping-scale=5, etc. up to 0x08..0xFF for -asan-mapping-scale=8. (Not sure that any of this works at scales higher than 8 tbh.) Frankly, I think that passing the constant to a generic routine would be as good in practice, reduce the number of one-off functions and work for -asan-mapping-scale up to 8. @vitalybuka and @kubamracek , what do you think? My sense is to make a __asan_set_shadow1(address, value) and kill two birds with one stone.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136197/new/
https://reviews.llvm.org/D136197
More information about the llvm-commits
mailing list