[clang] Implement src:*=sanitize for UBSan (PR #139772)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 18:31:29 PDT 2025
================
@@ -0,0 +1,23 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=signed-integer-overflow -fsanitize-ignorelist=%t/src.ignorelist -emit-llvm %t/test1.c -o - | FileCheck %s -check-prefix=CHECK-ALLOWLIST
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=signed-integer-overflow -fsanitize-ignorelist=%t/src.ignorelist -emit-llvm %t/test2.c -o - | FileCheck %s -check-prefix=CHECK-IGNORELIST
+
+
+// Verify ubsan only emits checks for files in the allowlist
+
+//--- src.ignorelist
+src:*
----------------
vitalybuka wrote:
Looks like we have a problem with:
```
src:*
src:*/mylib/*=sanitize
src:*/mylib/test.cc
```
https://github.com/llvm/llvm-project/pull/139772
More information about the cfe-commits
mailing list