[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
Tue Oct 18 13:59:04 PDT 2022


vitalybuka added a comment.

the patch is technically correct
however ___asan_set_shadow_* where introduced to workaround some backed issues to handle huge functions. ___asan_set_shadow_01 can't be repeated, so likely outlining will cost more then inlining

Which arch is your target? On ARM HWASAN is better tool to detect same kind of bugs.



================
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);
----------------
if we want to optimize, these can't have anything other than 1 as size


================
Comment at: compiler-rt/test/asan/TestCases/set_shadow_test.c:38
   switch (arg) {
+
   // X00-NOT: AddressSanitizer
----------------
remove new line


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