about summary refs log tree commit diff
path: root/src/afl-fuzz-stats.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-03 15:49:23 +0200
committervan Hauser <vh@thc.org>2020-06-03 15:49:23 +0200
commitdd0ca7335ff93090def7be7fd0b46e9f71375004 (patch)
tree3c447d24b4fed3d8277a19ffe8b53000656a7a95 /src/afl-fuzz-stats.c
parent686d8823eb8eab3a7cb87f4affec56e0d6e402d1 (diff)
downloadafl++-dd0ca7335ff93090def7be7fd0b46e9f71375004.tar.gz
switch shmem_len to the map
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r--src/afl-fuzz-stats.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index 97221572..1f5552e0 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -138,6 +138,20 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
       afl->orig_cmdline);
   /* ignore errors */
 
+  if (afl->debug) {
+
+    fprintf(f, "virgin_bytes     :");
+    for (uint32_t i = 0; i < afl->fsrv.map_size; i++)
+      if (afl->virgin_bits[i] != 0xff)
+        fprintf(f, " %d[%02x]", i, afl->virgin_bits[i]);
+    fprintf(f, "\n");
+    fprintf(f, "var_bytes        :");
+    for (uint32_t i = 0; i < afl->fsrv.map_size; i++)
+      if (afl->var_bytes[i]) fprintf(f, " %d", i);
+    fprintf(f, "\n");
+
+  }
+
   fclose(f);
 
 }