[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 13:45:00 PDT 2022


vitalybuka added inline comments.


================
Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:55
+
+  bool IsExcluded = CGM.isInNoSanitizeList(GV, Loc, Ty);
+  IsExcluded |= (NoSanitizeMask == SanitizerKind::All);
----------------
vitalybuka wrote:
> it can be in some weird ubsan check ignore list, and this way it will propagate on asan/hwasan
> I don't think you can avoid extending isInNoSanitizeList (in a separate patch)
you you can introduce:

```
bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind, llvm::GlobalVariable *GV,
                                       SourceLocation Loc) const {
```

similar to

```
bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind, llvm::Function *Fn,
                                       SourceLocation Loc) const {
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126929/new/

https://reviews.llvm.org/D126929



More information about the llvm-commits mailing list