[clang] [llvm] [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
Thu Feb 15 07:57:10 PST 2024


b-sumner wrote:

Hi @hctim, I'm really not seeing how this patch could possibly prevent ASAN or other sanitizers from arbitrarily changing their implementations or placing arbitrary data in redzones.  This patch is merely introducing additional symbols that overlap with the uninstrumented parts of instrumented objects.   We would need to do this again if we implemented MSAN, so would be fine with not restricting it to ASAN if that is the concern.

Of course our runtime could avoid checking the shadow when copying, but that would be just as crippling as disabling checking by memcpy() and memmove().  It's not an option.

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


More information about the cfe-commits mailing list