about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-08 09:39:26 +0200
committervan Hauser <vh@thc.org>2020-07-08 09:39:26 +0200
commit70bd0f799de1a907627b28ad80a447634299839b (patch)
tree45b487c013aade34178f1328b2c4f97e0a151d3f
parentcbe029664e9e4d718119d8f1758c1bcc6c8dbfce (diff)
downloadafl++-70bd0f799de1a907627b28ad80a447634299839b.tar.gz
fix afl-whatsup if fuzzer_stats is still empty
-rwxr-xr-xafl-whatsup7
1 files changed, 5 insertions, 2 deletions
diff --git a/afl-whatsup b/afl-whatsup
index 1f3a8219..abcddbf1 100755
--- a/afl-whatsup
+++ b/afl-whatsup
@@ -162,7 +162,8 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do
 
   ALIVE_CNT=$((ALIVE_CNT + 1))
 
-  EXEC_SEC=$((execs_done / RUN_UNIX))
+  EXEC_SEC=0
+  test -z "$RUN_UNIX" -o "$RUN_UNIX" = 0 || EXEC_SEC=$((execs_done / RUN_UNIX))
   PATH_PERC=$((cur_path * 100 / paths_total))
 
   TOTAL_TIME=$((TOTAL_TIME + RUN_UNIX))
@@ -184,7 +185,9 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do
       echo "  ${RED}timeout_ratio $TIMEOUT_PERC%${NC}"
     fi
 
-    if [ $EXEC_SEC -lt 100 ]; then
+    if [ $EXEC_SEC -eq 0 ]; then
+      echo "  ${YELLOW}no data yet, 0 execs/sec${NC}"
+    elif [ $EXEC_SEC -lt 100 ]; then
       echo "  ${RED}slow execution, $EXEC_SEC execs/sec${NC}"
     fi