diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-cc.c | 5 | ||||
-rw-r--r-- | src/afl-fuzz-queue.c | 3 | ||||
-rw-r--r-- | src/afl-fuzz-stats.c | 18 |
3 files changed, 17 insertions, 9 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c index c872b2eb..7afab850 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -2366,8 +2366,7 @@ static void add_aflpplib(aflcc_state_t *aflcc) { insert_param(aflcc, afllib); #ifdef __APPLE__ - insert_param(aflcc, "-Wl,-undefined"); - insert_param(aflcc, "dynamic_lookup"); + insert_param(aflcc, "-Wl,-undefined,dynamic_lookup"); #endif } @@ -2844,7 +2843,7 @@ static void maybe_usage(aflcc_state_t *aflcc, int argc, char **argv) { " The best is LTO but it often needs RANLIB and AR settings outside " "of afl-cc.\n\n"); -#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) +#if LLVM_MAJOR >= 11 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) #define NATIVE_MSG \ " LLVM-NATIVE: use llvm's native PCGUARD instrumentation (less " \ "performant)\n" diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index 2318df60..784b377a 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -1301,7 +1301,8 @@ inline u8 *queue_testcase_get(afl_state_t *afl, struct queue_entry *q) { static u32 do_once = 0; // because even threaded we would want this. WIP while (unlikely( - afl->q_testcase_cache_size + len >= afl->q_testcase_max_cache_size || + (afl->q_testcase_cache_size + len >= afl->q_testcase_max_cache_size && + afl->q_testcase_cache_count > 1) || afl->q_testcase_cache_count >= afl->q_testcase_max_cache_entries - 1)) { /* We want a max number of entries to the cache that we learn. diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index ffe56cde..eafeebba 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -322,7 +322,8 @@ void write_stats_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg, if (getrusage(RUSAGE_CHILDREN, &rus)) { rus.ru_maxrss = 0; } #endif u64 runtime_ms = afl->prev_run_time + cur_time - afl->start_time; - u64 overhead_ms = (afl->calibration_time_us + afl->sync_time_us + afl->trim_time_us) / 1000; + u64 overhead_ms = + (afl->calibration_time_us + afl->sync_time_us + afl->trim_time_us) / 1000; if (!runtime_ms) { runtime_ms = 1; } fprintf( @@ -632,7 +633,8 @@ void show_stats_normal(afl_state_t *afl) { if (afl->most_time_key && afl->queue_cycle) { - if (afl->most_time * 1000 + afl->sync_time_us / 1000 < cur_ms - afl->start_time) { + if (afl->most_time * 1000 + afl->sync_time_us / 1000 < + cur_ms - afl->start_time) { afl->most_time_key = 2; afl->stop_soon = 2; @@ -1329,7 +1331,9 @@ void show_stats_normal(afl_state_t *afl) { sprintf(tmp, "disabled, "); - } else if (unlikely(!afl->bytes_trim_out)) { + } else if (unlikely(!afl->bytes_trim_out || + + afl->bytes_trim_in <= afl->bytes_trim_out)) { sprintf(tmp, "n/a, "); @@ -1346,7 +1350,9 @@ void show_stats_normal(afl_state_t *afl) { strcat(tmp, "disabled"); - } else if (unlikely(!afl->blocks_eff_total)) { + } else if (unlikely(!afl->blocks_eff_total || + + afl->blocks_eff_select >= afl->blocks_eff_total)) { strcat(tmp, "n/a"); @@ -1462,7 +1468,8 @@ void show_stats_pizza(afl_state_t *afl) { if (afl->most_time_key && afl->queue_cycle) { - if (afl->most_time * 1000 + afl->sync_time_us / 1000 < cur_ms - afl->start_time) { + if (afl->most_time * 1000 + afl->sync_time_us / 1000 < + cur_ms - afl->start_time) { afl->most_time_key = 2; afl->stop_soon = 2; @@ -2503,3 +2510,4 @@ void update_sync_time(afl_state_t *afl, u64 *time) { *time = cur; } + |