about summary refs log tree commit diff
path: root/include/forkserver.h
diff options
context:
space:
mode:
authorHuanyao Rong <r3tr0spect2019@qq.com>2024-06-21 21:03:37 -0700
committerNguyễn Gia Phong <cnx@loang.net>2024-12-03 11:17:44 +0900
commitd04bdf2e841fa6706c16bbba1cb6f6c73d647767 (patch)
tree23393adc733e6e9e61d7eb226c90258870bb0624 /include/forkserver.h
parentcee3c86d7d5f0a05ad6cbb1434dc13162a16e336 (diff)
downloadafl++-d04bdf2e841fa6706c16bbba1cb6f6c73d647767.tar.gz
Implement AFLRun
References: https://github.com/Mem2019/AFLRun/commit/f5bb87f78ef1
References: https://github.com/Mem2019/AFLRun/commit/3af5f11b5644
Diffstat (limited to 'include/forkserver.h')
-rw-r--r--include/forkserver.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/forkserver.h b/include/forkserver.h
index 35bc1771..dbf5fc6e 100644
--- a/include/forkserver.h
+++ b/include/forkserver.h
@@ -32,6 +32,7 @@
 #include <stdbool.h>
 
 #include "types.h"
+#include "trace.h"
 
 #ifdef __linux__
 /**
@@ -82,6 +83,12 @@ typedef struct afl_forkserver {
   /* a program that includes afl-forkserver needs to define these */
 
   u8 *trace_bits;                       /* SHM with instrumentation bitmap  */
+  u8* trace_reachables;                 /* SHM to trace reachable BBs       */
+  u8* trace_freachables;                /* SHM to trace reachable Functions */
+  u8* trace_ctx;                    /* SHM to trace reachables with context */
+  trace_t* trace_virgin;               /* For each newly reached virgin block,
+ we record call context and path context, this is useful for fringe testing */
+  trace_t* trace_targets;              /* Reached targets in each run       */
 
   s32 fsrv_pid,                         /* PID of the fork server           */
       child_pid,                        /* PID of the fuzzed program        */
@@ -180,6 +187,15 @@ typedef struct afl_forkserver {
   char                 *nyx_aux_string;
 #endif
 
+  reach_t num_targets,           /* Number of target basic blocks */
+           num_reachables;            /* Number of basic blocks reachable
+                                          to any target*/
+  reach_t num_ftargets,          /* Number of target functions */
+           num_freachables;           /* Number of functions reachable
+                                          to any function target */
+
+  u8 testing;
+
 } afl_forkserver_t;
 
 typedef enum fsrv_run_result {