aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config.h4
-rw-r--r--include/forkserver.h3
-rw-r--r--include/sharedmem.h4
3 files changed, 10 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h
index d8177a75..8cc344da 100644
--- a/include/config.h
+++ b/include/config.h
@@ -403,6 +403,7 @@
/* Environment variable used to pass SHM ID to the called program. */
#define SHM_ENV_VAR "__AFL_SHM_ID"
+#define DFG_SHM_ENV_VAR "__AFL_DFG_SHM_ID"
/* Environment variable used to pass SHM FUZZ ID to the called program. */
@@ -470,6 +471,9 @@
#define MAP_INITIAL_SIZE MAP_SIZE
#endif
+#define DFG_MAP_SIZE_POW2 16
+#define DFG_MAP_SIZE (1U << DFG_MAP_SIZE_POW2)
+
/* Maximum allocator request size (keep well under INT_MAX): */
#define MAX_ALLOC 0x40000000
diff --git a/include/forkserver.h b/include/forkserver.h
index d3d0e086..882f4f01 100644
--- a/include/forkserver.h
+++ b/include/forkserver.h
@@ -103,7 +103,8 @@ typedef struct afl_forkserver {
/* a program that includes afl-forkserver needs to define these */
- u8 *trace_bits; /* SHM with instrumentation bitmap */
+ u8 *trace_bits; /* SHM with code coverage bitmap */
+ u32 *dfg_bits; /* SHM with DFG coverage bitmap */
s32 fsrv_pid, /* PID of the fork server */
child_pid, /* PID of the fuzzed program */
diff --git a/include/sharedmem.h b/include/sharedmem.h
index 036fa560..ea03205a 100644
--- a/include/sharedmem.h
+++ b/include/sharedmem.h
@@ -38,15 +38,19 @@ typedef struct sharedmem {
/* ================ Proteas ================ */
int g_shm_fd;
char g_shm_file_path[L_tmpnam];
+ int dfg_g_shm_fd;
+ char dfg_g_shm_file_path[L_tmpnam];
int cmplog_g_shm_fd;
char cmplog_g_shm_file_path[L_tmpnam];
/* ========================================= */
#else
s32 shm_id; /* ID of the SHM region */
+ s32 dfg_shm_id; /* ID of the DFG SHM region */
s32 cmplog_shm_id;
#endif
u8 *map; /* shared memory region */
+ u32 *dfg_map; /* DFG shared memory region */
size_t map_size; /* actual allocated size */