about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-03-31 14:01:22 +0200
committerDominik Maier <domenukk@gmail.com>2020-04-01 13:10:07 +0200
commitc8bdf0790f7d19078d9ec5705fc04eefd8615988 (patch)
tree5815f50a9bbfdd268114978cfff6ee1850bceb13
parent0b8a5cb4bb8c1d940557b02d58f9ea653c8e9443 (diff)
downloadafl++-c8bdf0790f7d19078d9ec5705fc04eefd8615988.tar.gz
reenabled custom mutator report
-rw-r--r--examples/custom_mutators/Makefile2
-rw-r--r--llvm_mode/afl-clang-fast.c1
-rw-r--r--src/afl-fuzz-one.c1
-rwxr-xr-xtest/test.sh2
4 files changed, 3 insertions, 3 deletions
diff --git a/examples/custom_mutators/Makefile b/examples/custom_mutators/Makefile
index 463cefb1..9849f3f4 100644
--- a/examples/custom_mutators/Makefile
+++ b/examples/custom_mutators/Makefile
@@ -1,7 +1,7 @@
 all: libexamplemutator.so
 
 libexamplemutator.so:
-	$(CC) $(CFLAGS) -fPIC -shared -g -I ../../include example.c -o libexamplemutator.so
+	$(CC) $(CFLAGS) -D_FORTIFY_SOURCE=2 -O3 -fPIC -shared -g -I ../../include example.c -o libexamplemutator.so
 
 clean:
 	rm -rf libexamplemutator.so
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 99bc8d03..de8d3410 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -48,7 +48,6 @@ static u8   debug;
 static u8   cwd[4096];
 static u8   cmplog_mode;
 u8          use_stdin = 0;                                         /* dummy */
-u8          be_quiet = 0;
 
 u8 *getthecwd() {
 
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 2e49e19b..b20bde90 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -1648,6 +1648,7 @@ custom_mutator_stage:
     }
 
     /* `(afl->)out_buf` may have been changed by the call to custom_fuzz */
+    /* TODO: Only do this when `mutated_buf` == `out_buf`? Branch vs Memcpy. */
     memcpy(out_buf, in_buf, len);
 
   }
diff --git a/test/test.sh b/test/test.sh
index 0dc58cc8..a04df384 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -961,7 +961,7 @@ test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUS
     CODE=1
   }
 
-  test "$CODE" = 1 && { $ECHO "$YELLOW[!] custom mutator tests currently will not fail travis" ; CODE=0 ; }
+  #test "$CODE" = 1 && { $ECHO "$YELLOW[!] custom mutator tests currently will not fail travis" ; CODE=0 ; }
 
   make -C ../examples/custom_mutators clean > /dev/null 2>&1
   rm -f test-custom-mutator