Improve the fuzztest.

Enable -fstack-protector-all to detect any stack smashing bugs. Also
use test_decode3 for maximal vulnerable surface.
This commit is contained in:
Petteri Aimonen
2013-03-09 12:51:47 +02:00
parent a9c88f5570
commit 96d4016838

View File

@@ -15,8 +15,8 @@ CC_VERSION=$(shell $(CC) -v 2>&1)
CFLAGS_CORE=
ifneq (,$(findstring gcc,$(CC_VERSION)))
CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wlogical-op -Wconversion
CFLAGS+=--coverage
LDFLAGS+=--coverage
CFLAGS+=--coverage -fstack-protector-all
LDFLAGS+=--coverage
endif
ifneq (,$(findstring clang,$(CC_VERSION)))
CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wconversion
@@ -127,5 +127,5 @@ test_options: options.pb.h options.expected options.pb.o
fi \
done
run_fuzztest: test_decode2
bash -c 'I=1; while true; do cat /dev/urandom | ./test_decode2 > /dev/null; I=$$(($$I+1)); echo -en "\r$$I"; done'
run_fuzztest: test_decode3
bash -c 'ulimit -c unlimited; I=1; while true; do cat /dev/urandom | ./test_decode3 > /dev/null; I=$$(($$I+1)); echo -en "\r$$I"; done'