From 96d40168383519b6b82a7eb850a558aeb62917e9 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sat, 9 Mar 2013 12:51:47 +0200 Subject: [PATCH] Improve the fuzztest. Enable -fstack-protector-all to detect any stack smashing bugs. Also use test_decode3 for maximal vulnerable surface. --- tests/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 7385fe35..181628a2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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' -- 2.16.6