[llvm] 35b1a64 - Add documentation of new sanitizer-specific GV attributes.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 12:46:27 PDT 2022
Author: Mitch Phillips
Date: 2022-06-10T12:46:02-07:00
New Revision: 35b1a645892c71d461fbb859e65dc5f30994a365
URL: https://github.com/llvm/llvm-project/commit/35b1a645892c71d461fbb859e65dc5f30994a365
DIFF: https://github.com/llvm/llvm-project/commit/35b1a645892c71d461fbb859e65dc5f30994a365.diff
LOG: Add documentation of new sanitizer-specific GV attributes.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D126922
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index d50aac1d7e61..d11283d73087 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -746,6 +746,8 @@ Syntax::
<global | constant> <Type> [<InitializerConstant>]
[, section "name"] [, partition "name"]
[, comdat [($name)]] [, align <Alignment>]
+ [, no_sanitize] [, no_sanitize_address]
+ [, no_sanitize_hwaddress] [, sanitize_address_dyninit]
(, !name !N)*
For example, the following defines a global in a numbered address space
@@ -2321,6 +2323,25 @@ Attributes may be set to communicate additional information about a global varia
Unlike :ref:`function attributes <fnattrs>`, attributes on a global variable
are grouped into a single :ref:`attribute group <attrgrp>`.
+``no_sanitize``
+ This attribute indicates that the global variable should not have any
+ sanitizers applied to it, either because it was in the sanitizer ignore
+ list, or it was annotated with
+ `__attribute__((disable_sanitizer_instrumentation))`.
+``no_sanitize_address``
+ This attribute indicates that the global variable should not have
+ AddressSanitizer instrumentation applied to it, because it was annotated
+ with `__attribute__((no_sanitize("address")))`.
+``no_sanitize_hwaddress``
+ This attribute indicates that the global variable should not have
+ HWAddressSanitizer instrumentation applied to it, because it was annotated
+ with `__attribute__((no_sanitize("hwaddress")))`.
+``sanitize_address_dyninit``
+ This attribute indicates that the global variable, when instrumented with
+ AddressSanitizer, should be checked for ODR violations. This attribute is
+ applied to global variables that are dynamically initialized according to
+ C++ rules.
+
.. _opbundles:
Operand Bundles
More information about the llvm-commits
mailing list