================ @@ -2445,6 +2445,11 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M, // zero so we can copy the metadata over as is. NewGlobal->copyMetadata(G, 0); + // Set sanitizer metadata for newly created global, + // if it doesn't have it. ---------------- skc7 wrote:
Clang codegen seems to add the SanitizerMetadata for globals, but when asan pass is run, some globals seems to have lost that. So I'm checking in asan pass if globals hasSanitizerMetadata() and if not present, adding one, with NoAddress set to false. This is used in AsmPrinter, to identify the asan instrumented globals with padded redzones. https://github.com/llvm/llvm-project/pull/66666 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits