Skip to content

[Sanitizer][Doc][NFC] Update the doc for prefix:*=sanitize #142659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

qinkunbao
Copy link
Member

@qinkunbao qinkunbao commented Jun 3, 2025

See #139128

Created using spr 1.3.6
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jun 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2025

@llvm/pr-subscribers-clang

Author: Qinkun Bao (qinkunbao)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/142659.diff

2 Files Affected:

  • (modified) clang/docs/ReleaseNotes.rst (+3-1)
  • (modified) clang/docs/SanitizerSpecialCaseList.rst (+16-2)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index eccee1aeef846..49ce9ef938fe9 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1045,7 +1045,9 @@ Sanitizers
 ----------
 
 - ``-fsanitize=vptr`` is no longer a part of ``-fsanitize=undefined``.
-- Sanitizer ignorelists now support the syntax ``src:*=sanitize``.
+- Sanitizer ignorelists now support the syntax ``src:*=sanitize``, 
+  ``type:*=sanitize``, ``fun:*=sanitize``, ``global:*=sanitize``,
+  and ``mainfile:*=sanitize``.
 
 Python Binding Changes
 ----------------------
diff --git a/clang/docs/SanitizerSpecialCaseList.rst b/clang/docs/SanitizerSpecialCaseList.rst
index 6f924cfa97a97..4d0715f8a68ce 100644
--- a/clang/docs/SanitizerSpecialCaseList.rst
+++ b/clang/docs/SanitizerSpecialCaseList.rst
@@ -79,7 +79,8 @@ instrumentation for arithmetic operations containing values of type ``int``.
 
 The ``=sanitize`` category is also supported. Any ``=sanitize`` category
 entries enable sanitizer instrumentation, even if it was ignored by entries
-before.
+before. Entries can be ``src``, ``type``, ``global``, ``fun``, and
+``mainfile``.
 
 With this, one may disable instrumentation for some or all types and
 specifically allow instrumentation for one or many types -- including types
@@ -103,7 +104,7 @@ supported sanitizers.
   }
 
 If multiple entries match the source, then the latest entry takes the
-precedence.
+precedence. Here are a few examples.
 
 .. code-block:: bash
 
@@ -119,6 +120,19 @@ precedence.
   src:*/mylib/test.cc
   src:*/mylib/*=sanitize
 
+  $ cat ignorelist3.txt
+  # Type T will be instrumented.
+  type:*
+  type:T=sanitize
+  type:T
+
+  $ cat ignorelist4.txt
+  # Function `bad_bar`` will be instrumented.
+  # Function `good_bar` will not be instrumented.
+  fun:*
+  fun:bar*
+  fun:bad_bar=sanitize
+
 Format
 ======
 

Created using spr 1.3.6
@qinkunbao qinkunbao requested a review from vitalybuka June 3, 2025 19:32
Created using spr 1.3.6
@qinkunbao
Copy link
Member Author

I don't think the doc build broken is related to this PR. https://github.com/llvm/llvm-project/actions/runs/15426207709/job/43413626057?pr=142659
But I will look into the issue.

Created using spr 1.3.6
@llvmbot llvmbot added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Jun 3, 2025
qinkunbao added 2 commits June 4, 2025 00:09
Created using spr 1.3.6

[skip ci]
Created using spr 1.3.6
@qinkunbao qinkunbao closed this Jun 4, 2025
@@ -813,19 +813,19 @@ changes to one object won't affect the others, the object's initializer will run
once per copy, etc.

Specifically, this warning fires when it detects an object which:
1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
2. Has external linkage (otherwise it's supposed to be duplicated), and
3. Has hidden visibility.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep this file in a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, split it in #142700

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then you can just rebase this one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Then I will close #142701

@vitalybuka
Copy link
Collaborator

Closed?

@qinkunbao
Copy link
Member Author

qinkunbao commented Jun 4, 2025

I split this PR into two

@vitalybuka vitalybuka reopened this Jun 4, 2025
@qinkunbao qinkunbao changed the title [Sanitizer][Doc][NFI] Update the doc for prefix:*=sanitize [Sanitizer][Doc][NFC] Update the doc for prefix:*=sanitize Jun 4, 2025
@qinkunbao qinkunbao merged commit 63861d6 into main Jun 4, 2025
6 of 10 checks passed
@qinkunbao qinkunbao deleted the users/qinkunbao/spr/sanitizerdocnfi-update-the-doc-for-prefixsanitize branch June 4, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants