Debugging Tools - ProkopHapala/FireCore GitHub Wiki
Segfaults and memeory leaks
Runtime array bounds checking in C++ built with g++
Memory address sanitizer
- Use like this:
- with g++ :
g++ -g -Og -fsanitize=address -fno-omit-frame-pointer
- with cmake:
SET( AXULIARY_COMPILE_FLAGS "-g -Og -fsanitize=address -fno-omit-frame-pointer")
- Memory/Address Sanitizer vs Valgrind
Valgrind
- Use like this:
valgrind --log-file="valgrind.log" --leak-check=yes ./MolGUIapp -x common_resources/H2O
cppcheck
- command line
>cppcheck --enable=all test.cpp
- install
sudo apt-get install cppcheck
- Cppcheck support in CMake