about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-01-08 00:47:52 +0100
committervan Hauser <vh@thc.org>2021-01-08 00:47:52 +0100
commit7b8c8cf12fde0feab25a1d794e010a5778cf9be8 (patch)
tree43b3008869697cad202f264376278d5fc01c46ef
parentfac373ec9e4a0a35a5f0491a34e790137ca17dee (diff)
downloadafl++-7b8c8cf12fde0feab25a1d794e010a5778cf9be8.tar.gz
fix
-rw-r--r--src/afl-fuzz-queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index de750f36..c375703d 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -56,7 +56,7 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
   }
 
   if (likely(afl->schedule < RARE)) { weight *= (avg_exec_us / q->exec_us); }
-  weight *= (q->bitmap_size / avg_bitmap_size);
+  weight *= (log(q->bitmap_size) / avg_bitmap_size);
   weight *= (log(q->tc_ref) / avg_top_size);
   if (unlikely(q->favored)) weight *= 5;
 
@@ -103,7 +103,7 @@ void create_alias_table(afl_state_t *afl) {
       if (likely(!q->disabled)) {
 
         avg_exec_us += q->exec_us;
-        avg_bitmap_size += q->bitmap_size;
+        avg_bitmap_size += log(q->bitmap_size);
         avg_top_size += log(q->tc_ref);
         ++active;