From 0a06f309f685ffa71721cf8a71c8eda2c03cd2b5 Mon Sep 17 00:00:00 2001 From: jadebenn Date: Thu, 21 Nov 2024 02:05:40 -0600 Subject: [PATCH] utils --- CMakeLists.txt | 5 +++-- valgrind.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 valgrind.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 088e0b7a..86ee8509 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,10 @@ project(Darkflame LANGUAGES C CXX ) -#add_compile_options("-fsanitize=address,undefined") +# TEMP - Sanitizer flags +# add_compile_options("-fsanitize=address,undefined" "-fvisibility=default") add_compile_options("-fsanitize=undefined" "-fvisibility=default") -add_link_options("-fsanitize=undefined" "-static-libsan") +add_link_options("-fsanitize=undefined" "-static-libasan") # check if the path to the source directory contains a space if("${CMAKE_SOURCE_DIR}" MATCHES " ") diff --git a/valgrind.sh b/valgrind.sh new file mode 100644 index 00000000..17499486 --- /dev/null +++ b/valgrind.sh @@ -0,0 +1 @@ +valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt build/gnu-debug/MasterServer