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

Mitch Phillips via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 05:48:52 PDT 2023


hctim wrote:

My assumption is that you have some driver code or preloaded DSO that effectively implements `copy_to_amdgpu`, which would do something with the symtab.

Can you just make your driver not be asan-ified (either by not building it with `-fsanitize=address` or using `__attribute__((no_sanitize("address")))` on the `copy_to_amdgpu` function? Then you'd copy the right quantity of data, and the access of the redzone would be ignored as there's no instrumentation there.

This seems like a more appropriate thing than making `st_other` symtab entries not actually the right size.

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


More information about the cfe-commits mailing list