about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-06-05 09:20:30 +0200
committervanhauser-thc <vh@thc.org>2024-06-05 09:20:30 +0200
commit2806d6be2f1d26eed7b42ae580f5bf7a29713a01 (patch)
treef6c4f3c8736f775c9245940e262f15ffb43afc9e /src/afl-fuzz.c
parent2d9b793dbbe9288a1caa4459c280678179bb46c9 (diff)
downloadafl++-2806d6be2f1d26eed7b42ae580f5bf7a29713a01.tar.gz
optimize syncing
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 0f6216c4..49d25d5a 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -2943,35 +2943,26 @@ int main(int argc, char **argv_orig, char **envp) {
 
     if (likely(!afl->stop_soon && afl->sync_id)) {
 
-      if (likely(afl->skip_deterministic)) {
+      if (unlikely(afl->is_main_node)) {
 
-        if (unlikely(afl->is_main_node)) {
+        if (unlikely(cur_time > (afl->sync_time >> 1) + afl->last_sync_time)) {
 
-          if (unlikely(cur_time >
-                       (afl->sync_time >> 1) + afl->last_sync_time)) {
+          if (!(sync_interval_cnt++ % (SYNC_INTERVAL / 3))) {
 
-            if (!(sync_interval_cnt++ % (SYNC_INTERVAL / 3))) {
-
-              sync_fuzzers(afl);
-
-            }
+            sync_fuzzers(afl);
 
           }
 
-        } else {
+        }
 
-          if (unlikely(cur_time > afl->sync_time + afl->last_sync_time)) {
+      } else {
 
-            if (!(sync_interval_cnt++ % SYNC_INTERVAL)) { sync_fuzzers(afl); }
+        if (unlikely(cur_time > afl->sync_time + afl->last_sync_time)) {
 
-          }
+          if (!(sync_interval_cnt++ % SYNC_INTERVAL)) { sync_fuzzers(afl); }
 
         }
 
-      } else {
-
-        sync_fuzzers(afl);
-
       }
 
     }