Skip to content

Commit 1b4a38b

Browse files
committed
[docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute
TSan and MSan were the only remaining sanitizers referring to the deprecated attribute for issue suppression. Update the docs to recommend __attribute__((no_sanitize("..."))) instead. Differential Revision: https://reviews.llvm.org/D25885 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285349 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ad44c9e commit 1b4a38b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

docs/MemorySanitizer.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ whether MemorySanitizer is enabled. :ref:`\_\_has\_feature
7676
# endif
7777
#endif
7878
79-
``__attribute__((no_sanitize_memory))``
79+
``__attribute__((no_sanitize("memory")))``
8080
-----------------------------------------------
8181

8282
Some code should not be checked by MemorySanitizer. One may use the function
83-
attribute `no_sanitize_memory` to disable uninitialized checks in a particular
84-
function. MemorySanitizer may still instrument such functions to avoid false
85-
positives. This attribute may not be supported by other compilers, so we
86-
suggest to use it together with ``__has_feature(memory_sanitizer)``.
83+
attribute ``no_sanitize("memory")`` to disable uninitialized checks in a
84+
particular function. MemorySanitizer may still instrument such functions to
85+
avoid false positives. This attribute may not be supported by other compilers,
86+
so we suggest to use it together with ``__has_feature(memory_sanitizer)``.
8787

8888
Blacklist
8989
---------

docs/ThreadSanitizer.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ this purpose.
8383
# endif
8484
#endif
8585
86-
``__attribute__((no_sanitize_thread))``
86+
``__attribute__((no_sanitize("thread")))``
8787
-----------------------------------------------
8888

8989
Some code should not be instrumented by ThreadSanitizer. One may use the
90-
function attribute `no_sanitize_thread` to disable instrumentation of plain
90+
function attribute ``no_sanitize("thread")`` to disable instrumentation of plain
9191
(non-atomic) loads/stores in a particular function. ThreadSanitizer still
9292
instruments such functions to avoid false positives and provide meaningful stack
9393
traces. This attribute may not be supported by other compilers, so we suggest
@@ -99,9 +99,9 @@ Blacklist
9999
ThreadSanitizer supports ``src`` and ``fun`` entity types in
100100
:doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports
101101
in the specified source files or functions. Unlike functions marked with
102-
`no_sanitize_thread` attribute, blacklisted functions are not instrumented at
103-
all. This can lead to false positives due to missed synchronization via atomic
104-
operations and missed stack frames in reports.
102+
``no_sanitize("thread")`` attribute, blacklisted functions are not instrumented
103+
at all. This can lead to false positives due to missed synchronization via
104+
atomic operations and missed stack frames in reports.
105105

106106
Limitations
107107
-----------

0 commit comments

Comments
 (0)