[all-commits] [llvm/llvm-project] 4f1291: [UBSan] Implement src:*=sanitize for UBSan (#140529)

Qinkun Bao via All-commits all-commits at lists.llvm.org
Tue May 27 19:19:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f1291e484f969ee7f6514c691deaeffabe587d1
      https://github.com/llvm/llvm-project/commit/4f1291e484f969ee7f6514c691deaeffabe587d1
  Author: Qinkun Bao <qinkun at google.com>
  Date:   2025-05-27 (Tue, 27 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/docs/SanitizerSpecialCaseList.rst
    M clang/include/clang/Basic/SanitizerSpecialCaseList.h
    M clang/lib/Basic/NoSanitizeList.cpp
    M clang/lib/Basic/SanitizerSpecialCaseList.cpp
    M clang/test/CodeGen/ubsan-src-ignorelist-category.test

  Log Message:
  -----------
  [UBSan] Implement src:*=sanitize for UBSan (#140529)

Background: https://github.com/llvm/llvm-project/issues/139128

It is a draft implementation for "src:*=sanitize". It should be applied
to all sanitizers.

Any srcs assigned to the sanitize category will have their sanitizer
instrumentation remained ignored by "src:". For example,

```
src:*
src:*/test1.cc=sanitize
```

`test1.cc` will still have the UBSan instrumented.

Conflicting entries are resolved by the latest entry, which takes
precedence.

```
src:*
src:*/mylib/*=sanitize
src:*/mylib/test.cc
```
`test.cc` does not have the UBSan check (In this case,
`src:*/mylib/test.cc` overrides `src:*/mylib/*=sanitize` for `test.cc`).

```
src:*
src:*/mylib/test.cc
src:*/mylib/*=sanitize
```

`test1.cc` has the UBSan instrumented (In this case,
`src:*/mylib/*=sanitize` overrides `src:*/mylib/test.cc`).

Documents update will be in a new PR.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list