Community
cancel
Showing results for 
Search instead for 
Did you mean: 
DDavi52
New Contributor I
1,782 Views

GCC Address Sanitizer on Edison Platform

Hi:

I am developing using GCC natively on release 3.5 and have an issue with an addressing error. I was hoping to use the Address Sanitizer (Asan) to help in identifying my coding issues. I am able to complile with the address -fsanitize=address option. When it comes to linking the executable the following message is given; "cannot find libasan_preinit.o: No such file or directory". I've looked for the library (-lasan) and have been unable to locate. Does anyone know if Asan is available on the Edison platform, and if so is the process to use it?

Thanks

0 Kudos
3 Replies
idata
Community Manager
88 Views

Hello David.H,

 

 

Thanks for reaching out!

 

 

I have never used ASan when compiling on GCC. Nevertheless, I found in https://blog.qt.io/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ that the stock GCC has issues with address-sanitizer and libasan isn't linked automatically. It is also mentioned in the guide that if you use GCC from 4.8 branch ( https://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_8-branch/) you will be able to use this feature. Anyway, you will have to build the package from source in order to use ASan.

 

 

I hope this helps.

 

-Peter.
DDavi52
New Contributor I
88 Views

Peter:

Thank you for the quick response. Before I start to build packages I think I will use the existing debugging tools to attempt to locate the error(s).

David

idata
Community Manager
88 Views

Hi David.H,

 

 

Thank you for letting us know. Keep us updated on your project and if you have any questions, please don't hesitate to come back to the community. We'll try to help you in any way we can.

 

 

-Peter.
Reply