diff options
author | van Hauser <vh@thc.org> | 2020-03-20 17:10:44 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-03-20 17:10:44 +0100 |
commit | 5a74cffa0f22b4e3b3dbc829dfb1c8f7c7a6fb76 (patch) | |
tree | 364205f5e22d90706f5ca6e9cc625d3903e19033 /llvm_mode/afl-llvm-rt.o.c | |
parent | f21ff8bac85449728e0ef267afa065b7622ea70f (diff) | |
download | afl++-5a74cffa0f22b4e3b3dbc829dfb1c8f7c7a6fb76.tar.gz |
added llvm_mode ngram coverage
Diffstat (limited to 'llvm_mode/afl-llvm-rt.o.c')
-rw-r--r-- | llvm_mode/afl-llvm-rt.o.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c index 5f9a5534..8fad0fbb 100644 --- a/llvm_mode/afl-llvm-rt.o.c +++ b/llvm_mode/afl-llvm-rt.o.c @@ -26,6 +26,7 @@ #include "config.h" #include "types.h" #include "cmplog.h" +#include "llvm-ngram-coverage.h" #include <stdio.h> #include <stdlib.h> @@ -62,11 +63,11 @@ u8 __afl_area_initial[MAP_SIZE]; u8 *__afl_area_ptr = __afl_area_initial; #ifdef __ANDROID__ -u32 __afl_prev_loc; -u32 __afl_final_loc; +PREV_LOC_T __afl_prev_loc[MAX_NGRAM_SIZE]; +u32 __afl_final_loc; #else -__thread u32 __afl_prev_loc; -__thread u32 __afl_final_loc; +__thread PREV_LOC_T __afl_prev_loc[MAX_NGRAM_SIZE]; +__thread u32 __afl_final_loc; #endif struct cmp_map *__afl_cmp_map; @@ -281,7 +282,7 @@ int __afl_persistent_loop(unsigned int max_cnt) { memset(__afl_area_ptr, 0, MAP_SIZE); __afl_area_ptr[0] = 1; - __afl_prev_loc = 0; + memset(__afl_prev_loc, 0, MAX_NGRAM_SIZE * sizeof(PREV_LOC_T)); } @@ -298,7 +299,7 @@ int __afl_persistent_loop(unsigned int max_cnt) { raise(SIGSTOP); __afl_area_ptr[0] = 1; - __afl_prev_loc = 0; + memset(__afl_prev_loc, 0, MAX_NGRAM_SIZE * sizeof(PREV_LOC_T)); return 1; |