Skip to content

[clang][docs] Fix example in SanitizerSpecialCaseList.rst #149244

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vitalybuka
Copy link
Collaborator

As-ie example suppresses buffer overflow in
malloc, and leave memory leak in place. It can be
confusing.

Fixes #62421.

Created using spr 1.3.6
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 17, 2025
@vitalybuka vitalybuka requested review from fmayer and thurstond July 17, 2025 04:03
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

@llvm/pr-subscribers-clang

Author: Vitaly Buka (vitalybuka)

Changes

As-ie example suppresses buffer overflow in
malloc, and leave memory leak in place. It can be
confusing.

Fixes #62421.


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

1 Files Affected:

  • (modified) clang/docs/SanitizerSpecialCaseList.rst (+1)
diff --git a/clang/docs/SanitizerSpecialCaseList.rst b/clang/docs/SanitizerSpecialCaseList.rst
index 2c50778d0f491..194f2fc5a7825 100644
--- a/clang/docs/SanitizerSpecialCaseList.rst
+++ b/clang/docs/SanitizerSpecialCaseList.rst
@@ -39,6 +39,7 @@ Example
   void bad_foo() {
     int *a = (int*)malloc(40);
     a[10] = 1;
+    free(a);
   }
   int main() { bad_foo(); }
   $ cat ignorelist.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ASAN] ignorelist example in documentation unnecessary leaks memory.
4 participants