diff options
author | van Hauser <vh@thc.org> | 2024-05-17 23:55:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 23:55:55 +0200 |
commit | e7d871c8bf64962a658e447b90a1a3b43aaddc28 (patch) | |
tree | 7aec2a095a30ed609ce96f85ec3c4e0a8b8eb74c /src/afl-showmap.c | |
parent | 497f341eac230fab13d6b5c5153c36321371b180 (diff) | |
parent | 56d5aa3101945e81519a3fac8783d0d8fad82779 (diff) | |
download | afl++-e7d871c8bf64962a658e447b90a1a3b43aaddc28.tar.gz |
Merge pull request #2093 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r-- | src/afl-showmap.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c index 07a4844a..7e875040 100644 --- a/src/afl-showmap.c +++ b/src/afl-showmap.c @@ -178,7 +178,8 @@ fsrv_run_result_t fuzz_run_target(afl_state_t *afl, afl_forkserver_t *fsrv, void classify_counts(afl_forkserver_t *fsrv) { u8 *mem = fsrv->trace_bits; - const u8 *map = binary_mode ? count_class_binary : count_class_human; + const u8 *map = (binary_mode || collect_coverage) ? count_class_binary + : count_class_human; u32 i = map_size; @@ -240,14 +241,7 @@ static void analyze_results(afl_forkserver_t *fsrv) { u32 i; for (i = 0; i < map_size; i++) { - if (fsrv->trace_bits[i]) { - - total += fsrv->trace_bits[i]; - if (fsrv->trace_bits[i] > highest) highest = fsrv->trace_bits[i]; - // if (!coverage_map[i]) { coverage_map[i] = 1; } - coverage_map[i] |= fsrv->trace_bits[i]; - - } + if (fsrv->trace_bits[i]) { coverage_map[i] |= fsrv->trace_bits[i]; } } @@ -1339,6 +1333,8 @@ int main(int argc, char **argv_orig, char **envp) { } + if (collect_coverage) { binary_mode = false; } // ensure this + if (optind == argc || !out_file) { usage(argv[0]); } if (in_dir && in_filelist) { FATAL("you can only specify either -i or -I"); } @@ -1677,7 +1673,6 @@ int main(int argc, char **argv_orig, char **envp) { if ((coverage_map = (u8 *)malloc(map_size + 64)) == NULL) FATAL("coult not grab memory"); edges_only = false; - raw_instr_output = true; } |