From 007eff244e74031c4eb7e2ea05e8b5ee46264c53 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 13 Mar 2017 23:27:14 +0100 Subject: fuzz: Corrected default options in fuzz scripts [ci skip] This change assumes that afl-fuzz (and not libfuzzer) will be used by default. Signed-off-by: Nikos Mavrogiannopoulos --- devel/fuzz/Makefile | 4 ++-- devel/fuzz/README.md | 2 +- devel/fuzz/run-afl.sh | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/devel/fuzz/Makefile b/devel/fuzz/Makefile index dfdbc9c765..b9bf39ae17 100644 --- a/devel/fuzz/Makefile +++ b/devel/fuzz/Makefile @@ -16,8 +16,8 @@ # along with this file; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -CC?="gcc" -CFLAGS?=-g -fsanitize=address -fsanitize=undefined +CC?="afl-gcc" +#CFLAGS?=-g -fsanitize=address -fsanitize=undefined COMMON=-I../../lib/includes -L../../lib/.libs -Wl,-rpath=../../lib/.libs -lgnutls all: gnutls_pkcs7_parser_fuzzer gnutls_client_fuzzer gnutls_dn_parser_fuzzer \ diff --git a/devel/fuzz/README.md b/devel/fuzz/README.md index 96e3d7dc7c..108e1f2b18 100644 --- a/devel/fuzz/README.md +++ b/devel/fuzz/README.md @@ -26,7 +26,7 @@ This will execute AFL (which runs indefinitely until CTRL+C is pressed) and provide its output in a "gnutls_pkcs7_parser_fuzzer.PID.out" directory. -# Reproducing a specific issue +# Reproducing a reported issue from oss-fuzz Assuming an issue on the "gnutls_pkcs7_parser_fuzzer" was found, and the reproducer is placed in $FILE, to reproduce locally use the following commands diff --git a/devel/fuzz/run-afl.sh b/devel/fuzz/run-afl.sh index e10ae30b8b..95c6c43099 100755 --- a/devel/fuzz/run-afl.sh +++ b/devel/fuzz/run-afl.sh @@ -23,6 +23,7 @@ cat ${srcdir}/../../config.log|grep afl-gcc >/dev/null 2>&1 if test $? != 0;then echo "compile first library as:" echo "CC=afl-gcc ./configure" + exit 1 fi if test -z "$1";then -- cgit v1.2.1