The application layer memory overflow / cross-border / release issues such as duplicate checker (ASan)

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

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

AddressSanitizer (aka ASan) is a memory error detector for C/C++. It finds:

This tool is very fast. The average slowdown of the instrumented program is ~2x (see AddressSanitizerPerformanceNumbers).

The tool consists of a compiler instrumentation module (currently, an LLVM pass) and a run-time library which replaces the malloc function.

Powerful, easy to use, the default integrated into gcc 4.8;

Ease of integration, the use of only some of clang + In Flag, but also can do filtering: leakage of known function e.g.

Performance is also good, but the source of the 2 × occupied, much better compared valgrind;

Can be used with gdb / objdump -ldS;

Guess you like

Origin www.cnblogs.com/zengjianrong/p/11777456.html