[clang] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 25 00:04:26 PDT 2023
================
@@ -758,6 +758,19 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
// sections and expected to be contiguous (e.g. ObjC metadata).
const Align Alignment = getGVAlignment(GV, DL);
+ // Identify globals with "asan_instrumented" attribute and extract
+ // the actual global variable size.
+ uint64_t ActualSize = 0;
+ if (GV->hasAttribute(Attribute::SanitizeAddress)) {
----------------
skc7 wrote:
This would be replaced by "asan_instrumented" attributes, once #68865 gets approved and merged.
https://github.com/llvm/llvm-project/pull/70166
More information about the cfe-commits
mailing list