diff --git a/.github/workflows/clang-sanitizer.yml b/.github/workflows/clang-sanitizer.yml index 9799988fc52..1f670146ebb 100644 --- a/.github/workflows/clang-sanitizer.yml +++ b/.github/workflows/clang-sanitizer.yml @@ -36,6 +36,7 @@ jobs: cd san export UBSAN_OPTIONS=suppressions=../ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 export ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 + export LSAN_OPTIONS=suppressions=../lsan.supp ./DDNet "cl_download_skins 0;quit" || true ./DDNet-Server shutdown || true if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)" diff --git a/README.md b/README.md index bfbb4dc6ca9..52f65460997 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ make ``` and run with: ```bash -UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 ./DDNet +UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 LSAN_OPTIONS=suppressions=./lsan.supp ./DDNet ``` Check the SAN.\* files afterwards. This finds more problems than memcheck, runs faster, but requires a modern GCC/Clang compiler. diff --git a/lsan.supp b/lsan.supp new file mode 100644 index 00000000000..26c815387f9 --- /dev/null +++ b/lsan.supp @@ -0,0 +1 @@ +leak:CCommandProcessorFragment_OpenGL2::Cmd_CreateBufferObject diff --git a/scripts/integration_test.sh b/scripts/integration_test.sh index 7d5f3d738ff..024bc1b7ac9 100755 --- a/scripts/integration_test.sh +++ b/scripts/integration_test.sh @@ -124,8 +124,7 @@ fi # TODO: check for open ports instead port=17822 -cp ../ubsan.supp . -cp ../memcheck.supp . +cp ../ubsan.supp ../lsan.supp ../memcheck.supp . if [[ $OSTYPE == 'darwin'* ]]; then DETECT_LEAKS=0 @@ -135,6 +134,7 @@ fi export UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 export ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=$DETECT_LEAKS:halt_on_errors=0 +export LSAN_OPTIONS=suppressions=./lsan.supp function print_results() { if [ "$arg_valgrind_memcheck" == "1" ]; then @@ -153,7 +153,7 @@ function print_results() { } if [ "$arg_valgrind_memcheck" == "1" ]; then - tool="valgrind --tool=memcheck --gen-suppressions=all --suppressions=memcheck.supp" + tool="valgrind --tool=memcheck --gen-suppressions=all --suppressions=memcheck.supp --track-origins=yes" client_args="cl_menu_map \"\";" else tool="" @@ -242,6 +242,7 @@ say "/mc ;cmdlist ;saytime" EOF +sleep 1 echo "[*] test rcon commands" tr -d '\n' > client1.fifo << EOF rcon say hello from admin;