Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22004

AddressSanitizer: How could we know that object file/executable in C is compiled with AddressSanitizer?

$
0
0

We are planning to integrate AddressSanitizer tool into our build infrastructure.

For that i am working on our GNUmake files to compile all my C code with AddressSanitizer (adding flag :-fsanitize=address). Now i would like to verify whether created object file or executable is compiled with AddressSanitizer or not.

Is there any way i can verify the same.

I am just trying to run nm | grep asan :-

It gives following undefined reference symbols.

     U __asan_init
     U __asan_option_detect_stack_use_after_return
     U __asan_register_globals
     U __asan_report_load1
     U __asan_report_load4
     U __asan_stack_malloc_1
     U __asan_unregister_globals

I am not sure whether it is right way of checking. It shows undefined reference as above. I am not sure whether i am doing right way of integrated AddressSanitizer in our build system. Is it fine just to compile code with ( -fsanitize=address) ? or still i need to do something here for successful usage of AddressSanitizer.

Please help me in this. Thanks in Advance.


Viewing all articles
Browse latest Browse all 22004

Trending Articles