T2080 : How to use address sanitizer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

T2080 : How to use address sanitizer

905件の閲覧回数
tachyon11
Contributor I

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 ?

タグ(2)
0 件の賞賛
1 返信

693件の閲覧回数
r8070z
NXP Employee
NXP Employee

The GCC 4.8.1 document

https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc.pdf 

provides the sanitize options and refers to the google wiki documents - see Address Sanitizer

https://github.com/google/sanitizers/wiki/AddressSanitizer 

There are also using cases on the web, for example

Compiling with Address Sanitizer (ASAN) with CLANG and with GCC-4.8 · GitHub 

0 件の賞賛