Last active
December 29, 2018 21:45
-
-
Save jackpoz/7c4ad34bbad619596c17 to your computer and use it in GitHub Desktop.
valgrind/helgrind/ASan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake valgrind: | |
cmake .. -DCMAKE_INSTALL_PREFIX=/home/jackpoz/trinity -DWITH_COREDEBUG=FALSE -DWITH_WARNINGS=TRUE -DCMAKE_BUILD_TYPE=Debug -DNOJEM=TRUE -DSCRIPTS=static -DTOOLS=FALSE -DVALGRIND_INCLUDE_DIR=/home/jackpoz/valgrind/include | |
cmake valgrind jemalloc: | |
cmake .. -DCMAKE_INSTALL_PREFIX=/home/jackpoz/trinity -DWITH_COREDEBUG=FALSE -DWITH_WARNINGS=TRUE -DCMAKE_BUILD_TYPE=Debug -DNOJEM=FALSE -DSCRIPTS=static -DTOOLS=FALSE -DVALGRIND_INCLUDE_DIR=/home/jackpoz/valgrind/include | |
cmake helgrind: | |
cmake .. -DCMAKE_INSTALL_PREFIX=/home/jackpoz/trinity -DWITH_COREDEBUG=FALSE -DWITH_WARNINGS=TRUE -DCMAKE_BUILD_TYPE=Debug -DNOJEM=TRUE -DSCRIPTS=static -DTOOLS=FALSE -DVALGRIND_INCLUDE_DIR=/home/jackpoz/valgrind/include -DHELGRIND=TRUE | |
cmake helgrind jemalloc: | |
cmake .. -DCMAKE_INSTALL_PREFIX=/home/jackpoz/trinity -DWITH_COREDEBUG=FALSE -DWITH_WARNINGS=TRUE -DCMAKE_BUILD_TYPE=Debug -DNOJEM=FALSE -DSCRIPTS=static -DTOOLS=FALSE -DVALGRIND_INCLUDE_DIR=/home/jackpoz/valgrind/include -DHELGRIND=TRUE | |
cmake ASan | |
cmake .. -DCMAKE_INSTALL_PREFIX=/home/jackpoz/trinity -DWITH_COREDEBUG=FALSE -DWITH_WARNINGS=TRUE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DNOJEM=TRUE -DSCRIPTS=static -DTOOLS=FALSE -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address -fsanitize-recover=address -fsanitize-address-use-after-scope" -DCMAKE_C_FLAGS="-fno-omit-frame-pointer -fsanitize=address -fsanitize-recover=address -fsanitize-address-use-after-scope" | |
valgrind worldserver: | |
/home/jackpoz/valgrind/bin/valgrind --tool=memcheck --verbose --freelist-vol=100000000 --log-file=world.`date +%Y%m%d-%H%M%S`.log --num-callers=20 ./worldserver | |
valgrind worldserver more variable details | |
/home/jackpoz/valgrind/bin/valgrind --tool=memcheck --verbose --read-var-info=yes --freelist-vol=100000000 --log-file=world.`date +%Y%m%d-%H%M%S`.log --num-callers=20 ./worldserver | |
valgrind worldserver memory leak check | |
/home/jackpoz/valgrind/bin/valgrind --tool=memcheck --leak-check=full --verbose --freelist-vol=100000000 --log-file=world.`date +%Y%m%d-%H%M%S`.log --num-callers=20 ./worldserver | |
valgrind worldserver uninitialized values details | |
/home/jackpoz/valgrind/bin/valgrind --tool=memcheck --verbose --freelist-vol=100000000 --track-origins=yes --log-file=world.`date +%Y%m%d-%H%M%S`.log --num-callers=20 ./worldserver | |
helgrind worldserver | |
/home/jackpoz/valgrind/bin/valgrind --tool=helgrind --verbose --log-file=worldhel%p.log --gen-suppressions=all --suppressions=helgrind.supp ./worldserver | |
ASan worldserver | |
ASAN_OPTIONS=halt_on_error=0:verbosity=1:log_path=worldasan:detect_stack_use_after_return=1 LSAN_OPTIONS=verbosity=1:log_threads=1 ./worldserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ToDo: add ASan options:
Valgrind should still be used for uninitialized values as it's a pain to use MemorySanitizer to do the same check (2 different tools that do 2 different things after all)