[PATCH] D137992: [asan] -fsanitize-address-outline-instrumentation -> -asan-max-inline-poisoning-size=0
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 11:08:01 PST 2022
vitalybuka added a subscriber: kstoimenov.
vitalybuka added inline comments.
================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:1256
if (AsanOutlineInstrumentation) {
CmdArgs.push_back("-mllvm");
----------------
CC @kstoimenov
it's maybe not the best name for flag, but the point of AsanOutlineInstrumentation was to reduce binary size.
for -asan-instrumentation-with-call-threshold=0 sizeof(check+asan_report) > sizeof(outlined_check_report), so it helps with size
for -asan-max-inline-poisoning-size=0: usually sizeof(small store/load) < sizeof(poisoning_callbac). It usually increases the size.
Out internal setup expects the current size saving behavior of this flag.
So to move forward we can do the following instead:
1. Create a new flag for -asan-max-inline-poisoning-size=0, e.g. AsanOutlinePoisoning
1. Create a clone flag for -asan-instrumentation-with-call-threshold=0, e.g. AsanOutlineChecks
1. We switch out build system to the clone
1. Extend (or delete) AsanOutlineInstrumentation as in this patch
================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:1260
+ CmdArgs.push_back("-mllvm");
+ CmdArgs.push_back("-asan-max-inline-poisoning-size=0");
}
----------------
For changes like this we need to update llvm-project/clang/test/Driver/fsanitize.c
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137992/new/
https://reviews.llvm.org/D137992
More information about the cfe-commits
mailing list