Skip to content
Mael Rouxel-Labbé edited this page Mar 28, 2024 · 1 revision

About Sanitizers

The purpose of this page is to keep track of the different commands to call in order to use a sanitizer or an other.

Memory Leaks

Add -fsanitize=address to the CXX_FLAGS, configure, and call make -j6 <target> && ASAN_OPTIONS="detect_leaks=1 alloc_dealloc_mismatch=0" ./<executable> 2>build.log

CLang-tidy

Create a .clang-tidy file, that will contain the configuration for clang-tidy. (See here) call cmake -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-fix" and make <target> && ./<executable>

Clone this wiki locally