diff options
author | Huanyao Rong <r3tr0spect2019@qq.com> | 2024-06-21 21:03:37 -0700 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2024-12-03 11:17:44 +0900 |
commit | d04bdf2e841fa6706c16bbba1cb6f6c73d647767 (patch) | |
tree | 23393adc733e6e9e61d7eb226c90258870bb0624 /include/sharedmem.h | |
parent | cee3c86d7d5f0a05ad6cbb1434dc13162a16e336 (diff) | |
download | afl++-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/sharedmem.h')
-rw-r--r-- | include/sharedmem.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/sharedmem.h b/include/sharedmem.h index d32bd845..540f243b 100644 --- a/include/sharedmem.h +++ b/include/sharedmem.h @@ -29,6 +29,7 @@ #define __AFL_SHAREDMEM_H #include "types.h" +#include "trace.h" typedef struct sharedmem { @@ -56,8 +57,32 @@ typedef struct sharedmem { } sharedmem_t; +#ifdef USEMMAP +#error "AFLRun Does not support USEMMAP currently" +#endif + +typedef struct aflrun_shm { + + /* aflrun id */ + s32 shm_rbb_id, shm_rf_id, shm_tr_id, + shm_vir_id, shm_vtr_id, shm_tt_id, shm_div_id; + + u8 *map_reachables; /* SHM to trace reachable BBs */ + u8 *map_freachables; /* SHM to trace reachable Functions */ + u8 *map_ctx; /* SHM to trace reachables with context */ + trace_t *map_new_blocks; /* For each newly reached virgin block, + we record call context and path context, this is useful for fringe testing */ + u8 *map_virgin_ctx; /* Virgin bits for context-sensitive */ + trace_t *map_targets; /* For each reached targets, we record relative + information, this is useful for target diversity */ + u8 *div_switch; /* A switch to tell program if we should record diversity */ + +} aflrun_shm_t; + u8 *afl_shm_init(sharedmem_t *, size_t, unsigned char non_instrumented_mode); void afl_shm_deinit(sharedmem_t *); +void aflrun_shm_init(aflrun_shm_t*, reach_t, reach_t, unsigned char); +void aflrun_shm_deinit(aflrun_shm_t*); #endif |