Skip to content

Commit 63861d6

Browse files
authored
[Sanitizer][Doc][NFC] Update the doc for prefix:*=sanitize (#142659)
See #139128
1 parent b3a8c1e commit 63861d6

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ Sanitizers
10451045
----------
10461046

10471047
- ``-fsanitize=vptr`` is no longer a part of ``-fsanitize=undefined``.
1048-
- Sanitizer ignorelists now support the syntax ``src:*=sanitize``.
1048+
- Sanitizer ignorelists now support the syntax ``src:*=sanitize``,
1049+
``type:*=sanitize``, ``fun:*=sanitize``, ``global:*=sanitize``,
1050+
and ``mainfile:*=sanitize``.
10491051

10501052
Python Binding Changes
10511053
----------------------

clang/docs/SanitizerSpecialCaseList.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ instrumentation for arithmetic operations containing values of type ``int``.
7979

8080
The ``=sanitize`` category is also supported. Any ``=sanitize`` category
8181
entries enable sanitizer instrumentation, even if it was ignored by entries
82-
before.
82+
before. Entries can be ``src``, ``type``, ``global``, ``fun``, and
83+
``mainfile``.
8384

8485
With this, one may disable instrumentation for some or all types and
8586
specifically allow instrumentation for one or many types -- including types
@@ -103,7 +104,7 @@ supported sanitizers.
103104
}
104105
105106
If multiple entries match the source, then the latest entry takes the
106-
precedence.
107+
precedence. Here are a few examples.
107108

108109
.. code-block:: bash
109110
@@ -119,6 +120,19 @@ precedence.
119120
src:*/mylib/test.cc
120121
src:*/mylib/*=sanitize
121122
123+
$ cat ignorelist3.txt
124+
# Type T will not be instrumented.
125+
type:*
126+
type:T=sanitize
127+
type:T
128+
129+
$ cat ignorelist4.txt
130+
# Function `bad_bar`` will be instrumented.
131+
# Function `good_bar` will not be instrumented.
132+
fun:*
133+
fun:*bar
134+
fun:bad_bar=sanitize
135+
122136
Format
123137
======
124138

0 commit comments

Comments
 (0)