Open 0528Mike opened 1 year ago
If you're using Clang, you can pass try to pass -mllvm -asan-globals=0
as additional CFLAGS to disable globals instrumentation. GCC might have a similar param.
But there is no Kconfig variable to do that.
However, this method still cannot solve the problem of the compiler generating a nearly 80 byte metadata for each global variable. Once there are many global variables that I need to protect, this approach will cause my bin file to be very large.
Open asan global=1, and the compiler will generate a descriptor structure of nearly 80 bytes for each global variable. There is a lot of data in the structure that I do not need. Is there any way to remove them, as I am using Kasan on an embedded board and memory resources are scarce