When testing, build with -DDEBUG.
authorEmil Mikulic <emikulic@gmail.com>
Thu, 1 Jan 2015 07:32:01 +0000 (18:32 +1100)
committerEmil Mikulic <emikulic@gmail.com>
Thu, 1 Jan 2015 07:32:01 +0000 (18:32 +1100)
devel/checker
devel/clang-warns
devel/cover
devel/fuzz.sh
devel/warns

index d77c06d..fd3b919 100755 (executable)
@@ -11,4 +11,4 @@ CHECKER=$LLVM/llvm/tools/clang/tools/scan-build/ccc-analyzer
 $LLVM/llvm/tools/clang/tools/scan-build/scan-build \
   -analyze-headers \
   --use-analyzer=$LLVM/install/bin/clang \
-  clang $TARGET
+  clang -DDEBUG $TARGET
index 91c1fba..41bcea8 100755 (executable)
@@ -9,5 +9,5 @@ LLVM=$HOME/llvm
 
 $LLVM/install/bin/clang -Weverything -O \
   -Wno-unreachable-code -Wno-padded -Wno-disabled-macro-expansion \
-  $TARGET
+  -DDEBUG $TARGET
 rm -f a.out
index 1d47ed5..34fff03 100755 (executable)
@@ -13,7 +13,7 @@ if [ ! -e test.py ]; then
 fi
 if [ \( ! -x a.out \) -o \( ../darkhttpd.c -nt a.out \) ]; then
   echo "===> building a.out, darkhttpd.gcno"
-  $CC -g -O2 -fprofile-arcs -ftest-coverage ../darkhttpd.c || exit 1
+  $CC -g -O2 -fprofile-arcs -ftest-coverage -DDEBUG ../darkhttpd.c || exit 1
 fi
 if [ -e $DIR ]; then
        rm -rf $DIR || exit 1
index a0d292a..649d2dd 100755 (executable)
@@ -2,6 +2,6 @@
 AFL_PATH=~/afl/afl-1.06b
 export AFL_PATH
 TMP=/dev/shm/darkhttpd
-AFL_HARDEN=1 $AFL_PATH/afl-gcc -O3 fuzz_make_safe_uri.c -o fuzz_make_safe_uri
+AFL_HARDEN=1 $AFL_PATH/afl-gcc -O3 -DDEBUG fuzz_make_safe_uri.c -o fuzz_make_safe_uri
 mkdir $TMP
 $AFL_PATH/afl-fuzz -i fuzz_testcases -o $TMP ./fuzz_make_safe_uri
index 9ce0c79..e4adc07 100755 (executable)
@@ -4,7 +4,7 @@
 #
 TARGET=$(dirname $0)/../darkhttpd.c
 
-gcc -O -fstrict-aliasing \
+gcc -O2 -fstrict-aliasing \
   --all-warnings --extra-warnings \
- $TARGET
-DDEBUG $TARGET
 rm -f a.out