AnsweredAssumed Answered

T2080 : How to use address sanitizer

Question asked by Ji Hyun Yoon on Mar 6, 2017
Latest reply on Mar 6, 2017 by Serguei Podiatchev

According to GCC version, I think that the address sanitizer can be available.

To detecting memory corruption for the costom board, it seems to be so useful.

But  I've not used it ,yet.

 

https://en.wikipedia.org/wiki/AddressSanitizer

AddressSanitizer (or ASan) is a programming tool that detects memory corruption bugs such as buffer overflows or accesses to a dangling pointer (use-after-free).

AddressSanitizer is based on compiler instrumentation and directly-mapped shadow memory.

AddressSanitizer is currently implemented in Clang (starting from version 3.1[1]) and GCC (starting from version 4.8[2]). On average, the instrumentation increases processing time by about 73% and memory usage by 340%.[3]

 

In order to compile T2080 system, I've used the next GCC version

 

powerpc64-fsl-linux-gcc (GCC) 4.8.1

Copyright (C) 2013 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

Do you know how to use it ?

Is there a kind of manual for it ?

Outcomes