[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

Mitch Phillips via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 04:35:40 PST 2024


hctim wrote:

Messing around with global variables (changing their size, padding, alignment) is a common theme amongst sanitizers. We'd therefore want any strategy applied to ASan to be generic and apply across other sanitizers.

The patch might not cause issues right now with ASan - but I think it's best to reserve the right to change the way that ASan's global variable instrumentation works. The padding bytes are currently unused. But, I've heard at least one idea come across my desk to change that and to use the "free" metadata space. That would be incompatible with your patch. In contrary - I still don't know why the small section of AMDGPU's symbol-copying code can't be just built without `__attribute__((no_sanitize("address")))`

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


More information about the cfe-commits mailing list