diff options
author | Julien Dessaux | 2018-08-23 14:07:58 +0200 |
---|---|---|
committer | Julien Dessaux | 2018-08-23 17:41:44 +0200 |
commit | 4da77dcb10c74c4f369d731addf19c6a065e0684 (patch) | |
tree | 7b98cd7c8680ad6d90a4fcbd27f5020eb433adf5 /GNUmakefile | |
parent | Code cleaning and added error handling (diff) | |
download | bastion-4da77dcb10c74c4f369d731addf19c6a065e0684.tar.gz bastion-4da77dcb10c74c4f369d731addf19c6a065e0684.tar.bz2 bastion-4da77dcb10c74c4f369d731addf19c6a065e0684.zip |
Added address sanitization and fixed found bugs
Diffstat (limited to '')
-rw-r--r-- | GNUmakefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 38004ed..00f18ad 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,5 @@ CC=clang -DEBUG=-g +DEBUG=-g -fsanitize=address CFLAGS= ${DEBUG} -Wall -Werror -Wextra -Weverything -Wno-disabled-macro-expansion sources=$(wildcard src/*.c) @@ -22,6 +22,12 @@ clean: @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d @rm -f $*.d.tmp +# You must compile without -fsanitize=address to use valgrind valgrind: valgrind --leak-check=full --show-leak-kinds=all --trace-children=yes --suppressions=${HOME}/.valgrind_suppressions ./bastion #valgrind -v --leak-check=full --show-leak-kinds=all --trace-children=yes --suppressions=${HOME}/.valgrind_suppressions --gen-suppressions=yes ./bastion + +debug: + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=true:fast_unwind_on_malloc=0:check_initialization_order=1:suppressions=asan.supp \ + ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer \ + ./bastion |