[clang] [llvm] [TySan] A Type Sanitizer (Clang) (PR #76260)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 04:12:46 PST 2024


================
@@ -105,11 +106,32 @@ void SanitizerMetadata::reportGlobal(llvm::GlobalVariable *GV,
                                            GV, Loc, Ty, "init");
 
   GV->setSanitizerMetadata(Meta);
+
+  if (Ty.isNull() || !CGM.getLangOpts().Sanitize.has(SanitizerKind::Type) ||
----------------
fhahn wrote:

We also need to exclude globals defined externally as well I think: https://github.com/llvm/llvm-project/pull/120565

https://github.com/llvm/llvm-project/pull/76260


More information about the llvm-commits mailing list