[PATCH] D136197: [ASAN] Don't inline when -asan-max-inline-poisoning-size=0
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 15:55:35 PDT 2022
vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.
================
Comment at: compiler-rt/test/asan/TestCases/set_shadow_test.c:16-22
+void __asan_set_shadow_01(size_t addr, size_t size);
+void __asan_set_shadow_02(size_t addr, size_t size);
+void __asan_set_shadow_03(size_t addr, size_t size);
+void __asan_set_shadow_04(size_t addr, size_t size);
+void __asan_set_shadow_05(size_t addr, size_t size);
+void __asan_set_shadow_06(size_t addr, size_t size);
+void __asan_set_shadow_07(size_t addr, size_t size);
----------------
rsundahl wrote:
> rsundahl wrote:
> > vitalybuka wrote:
> > > if we want to optimize, these can't have anything other than 1 as size
> > Good value @vitalybuka. Thank you. I put asserts on the implementation side (compiler-rt/lib/asan/asan_poisoning.cpp) where I expect never to get anything but single byte partial poisoning calls but I will firm that up where the optimizer can see it.
> Rather than having a mix of one and two parameter functions right now, I'm leaning toward possibly adding both one and two parameter versions of all of the __asan_set_shadow_xx() calls, and using the one parameter calls (implied single byte) when I know I can. Would you be ok with deferring any action on this for now @vitalybuka?
Deferring should be fine. There is a tiny risk to be affected by Hyrum's Law, but I guess we will find workaround.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:2897
uint8_t Val = ShadowBytes[i];
if (!AsanSetShadowFunc[Val])
continue;
----------------
assert(AsanSetShadowFunc[Val])?
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