mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
added llvm_mode ngram coverage
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user