[PATCH] D105726: Added fsanitize-address-instrument-via-callback, which controls if address sanitizer will always use a callback.
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 13 23:48:52 PDT 2021
vitalybuka added a comment.
In D105726#2875482 <https://reviews.llvm.org/D105726#2875482>, @kstoimenov wrote:
> Modified UsersManual.rst and added a test. Couldn't find a relevant section in
> AddressSanitizer.rst and adding a new one is outside of the scope of this change.
something like:
Limitations
....
AddressSanitizer increases binary size. Use -fsanitize-address-instrument... to reduce the overhead.
================
Comment at: clang/docs/UsersManual.rst:1652
+**-f[no-]sanitize-address-instrument-via-callback**
+
----------------
Here "Callback" here does not match common meaning of this term and it's just out internal detail.
**-f[no-]sanitize-address-inline-instrumentation**
or even
**-f[no-]sanitize-address-inline**
or
**-f[no-]sanitize-address-outline-instrumentation**
================
Comment at: clang/include/clang/Driver/Options.td:1564
+ HelpText<"Always use callback for the address sanitizer">;
+def fnosanitize_address_instrument_via_callback : Flag<["-"], "fnosanitize-address-instrument-via-callback">,
+ Group<f_clang_Group>,
----------------
no-
================
Comment at: clang/test/Driver/fsanitize.c:254
+// CHECK-ASAN-CALLBACK-OK: "-mllvm" "-asan-instrumentation-with-call-threshold=0"
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fnosanitize-address-instrument-via-callback %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOCALLBACK
+// CHECK-ASAN-NOCALLBACK-NOT: "-mllvm" "-asan-instrumentation-with-call-threshold=0"
----------------
Maybe test pairs to make sure the last one is selected
"-fno-sanitize- -fsanitize-"
"-fsanitize- -no-fsanitize-"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105726/new/
https://reviews.llvm.org/D105726
More information about the cfe-commits
mailing list