about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-07-14 23:42:47 +0200
committerhexcoder- <heiko@hexco.de>2020-07-14 23:42:47 +0200
commitc5963f707c9a1b1ec0d869d90fabf09072093e1d (patch)
tree43eeb0e76a9450b2ee3d6d295291f0d2f0502d85
parent383b280531a92a8b81d112a9acb4e44c08987be0 (diff)
downloadafl++-c5963f707c9a1b1ec0d869d90fabf09072093e1d.tar.gz
make fuzzing of test-floatingpoint reproducible
-rw-r--r--test/test-floatingpoint.c2
-rwxr-xr-xtest/test.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/test-floatingpoint.c b/test/test-floatingpoint.c
index 76cdccf0..8f691c2c 100644
--- a/test/test-floatingpoint.c
+++ b/test/test-floatingpoint.c
@@ -3,7 +3,7 @@
 
 int main(void) {
 
-  long double magic;
+  float magic;
 
   ssize_t bytes_read = read(STDIN_FILENO, &magic, sizeof(magic));
   if (bytes_read < (ssize_t)sizeof(magic)) { return 1; }
diff --git a/test/test.sh b/test/test.sh
index e901176e..15082070 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -388,10 +388,10 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
   AFL_LLVM_INSTRUMENT=AFL AFL_DEBUG=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 AFL_LLVM_LAF_SPLIT_FLOATS=1 ../afl-clang-fast -o test-floatingpoint test-floatingpoint.c > test.out 2>&1
   test -e test-floatingpoint && {
     mkdir -p in
-    echo 0 > in/in
+    echo ZZ > in/in
     $ECHO "$GREY[*] running afl-fuzz with floating point splitting, this will take max. 30 seconds"
     {
-      AFL_BENCH_UNTIL_CRASH=1 ../afl-fuzz -V30 -m ${MEM_LIMIT} -i in -o out -- ./test-floatingpoint >>errors 2>&1
+      AFL_BENCH_UNTIL_CRASH=1 ../afl-fuzz -s1 -V30 -m ${MEM_LIMIT} -i in -o out -- ./test-floatingpoint >>errors 2>&1
     } >>errors 2>&1
     test -n "$( ls out/crashes/id:* 2>/dev/null )" && {
       $ECHO "$GREEN[+] llvm_mode laf-intel floatingpoint splitting feature works correctly"