https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81524

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Fredrik Hederstierna from comment #3)
> Isn't AddressSanitizer checking in run-time? There are several tools that
> can find this bugs in runtime I think like Valgrind, but I need to find this
> at compile-time.

Yes, it's run-time checking.

> 
> I use embedded arm-eabi target and cannot add memory for instrumentation
> with compile AddressSanitizer, or can AddressSanitizer do jobs alos in
> compile-time without adding code size for run-time instrumentation?

No, it verifies stuff just in compile time. Well I understand the arm-eabi is
not a good target for AddressSanization. Maybe you will be able to run the code
on x86_64 in a testing environment where you can catch various undefined
behavior stuff.

Please be note that AddressSanitizer is much powerful tool that a compile-time
checking, because due to multiple compilation modules or conservative
assumptions that compiler has to do, one can't find these issues in compile
time.

Reply via email to