[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
Fri Oct 27 07:19:02 PDT 2023


b-sumner wrote:

> It's my understanding your problem is that you are asan-trapping on the redzones when you copy data to/from the device. Is it possible instead to just make those copy-from and copy-to functions in the runtime `__attribute__((no_sanitize("address")))` and copy the padding as well?

Yes it is possible, but it would result in bugs being hidden...the very bugs that ASAN is meant to catch.  This is not an acceptable  option for us.

Would you please explain how you think that debugging tools would break with a symbol with the right name and size in the ELF?   Why would debuggers care that there is another symbol with a different name and a larger size also in the symbol table at the same offset?

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


More information about the cfe-commits mailing list