[PATCH] D48390: ASan docs: no_sanitize("address") works on globals.
Evgenii Stepanov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 20 12:54:31 PDT 2018
eugenis created this revision.
eugenis added a reviewer: alekseyshl.
Mention that no_sanitize attribute can be used with globals.
https://reviews.llvm.org/D48390
Files:
clang/docs/AddressSanitizer.rst
Index: clang/docs/AddressSanitizer.rst
===================================================================
--- clang/docs/AddressSanitizer.rst
+++ clang/docs/AddressSanitizer.rst
@@ -197,13 +197,17 @@
Disabling Instrumentation with ``__attribute__((no_sanitize("address")))``
--------------------------------------------------------------------------
-Some code should not be instrumented by AddressSanitizer. One may use the
-function attribute ``__attribute__((no_sanitize("address")))`` (which has
-deprecated synonyms `no_sanitize_address` and `no_address_safety_analysis`) to
-disable instrumentation of a particular function. This attribute may not be
-supported by other compilers, so we suggest to use it together with
+Some code should not be instrumented by AddressSanitizer. One may use
+the attribute ``__attribute__((no_sanitize("address")))`` (which has
+deprecated synonyms `no_sanitize_address` and
+`no_address_safety_analysis`) to disable instrumentation of a
+particular function. This attribute may not be supported by other
+compilers, so we suggest to use it together with
``__has_feature(address_sanitizer)``.
+The same attribute used on a global variable prevents AddressSanitizer
+from adding redzones around it and detecting out of bounds accesses.
+
Suppressing Errors in Recompiled Code (Blacklist)
-------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48390.152136.patch
Type: text/x-patch
Size: 1388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180620/cddf34fb/attachment.bin>
More information about the cfe-commits
mailing list