From 35b1a645892c71d461fbb859e65dc5f30994a365 Mon Sep 17 00:00:00 2001 From: Mitch Phillips <31459023+hctim@users.noreply.github.com> Date: Fri, 10 Jun 2022 12:45:26 -0700 Subject: [PATCH] Add documentation of new sanitizer-specific GV attributes. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D126922 --- llvm/docs/LangRef.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index d50aac1..d11283d 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -746,6 +746,8 @@ Syntax:: [] [, section "name"] [, partition "name"] [, comdat [($name)]] [, align ] + [, 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 `, attributes on a global variable are grouped into a single :ref:`attribute group `. +``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 -- 2.7.4