[clang] [ASAN] Adjust asan instrumented GlobalVariable size to not include redzone (PR #66666)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 09:35:51 PDT 2023


skc7 wrote:

@hctim, 
We want to identify global variables instrumented by asan at AsmPrinter stage. I can think of two approaches here: 

- Add SanitizerMetadata::NoAddress(false) at asan pass and also check if global is present in llvm.compiler.used list. 

- Create a new attribute (For Ex: "AsanInstrumentedVariable") and attach it to instrumented global variable at asan pass. Identify that GV at asmPrinter stage, using the attached attribute. 

Please let me know if any of these approaches work here? 

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


More information about the cfe-commits mailing list