about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-13 12:39:18 +0200
committervan Hauser <vh@thc.org>2020-08-13 12:39:18 +0200
commit2c5e103278c3266c15226f097e8e9e15267c57d6 (patch)
tree7566c87afdcda7ee21fa87eb3eacfaed31887b61
parent7a6867e2f8e8b698c08366f79d0c8751b09ce431 (diff)
downloadafl++-2c5e103278c3266c15226f097e8e9e15267c57d6.tar.gz
make cmplog deterministic
-rw-r--r--docs/Changelog.md2
-rw-r--r--src/afl-fuzz-redqueen.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 1c5b3f4a..45d640ea 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -19,7 +19,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
      - eliminated CPU affinity race condition for -S/-M runs
      - expanded havoc mode added, on no cycle finds add extra splicing and
        MOpt into the mix
-     - fixed a bug in redqueen for strings
+     - fixed a bug in redqueen for strings and made deterministic with -s
   - llvm_mode:
      - now supports llvm 12!
      - support for AFL_LLVM_ALLOWLIST/AFL_LLVM_DENYLIST (previous
diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c
index 9716be95..4309098a 100644
--- a/src/afl-fuzz-redqueen.c
+++ b/src/afl-fuzz-redqueen.c
@@ -151,7 +151,7 @@ static u8 colorization(afl_state_t *afl, u8 *buf, u32 len, u64 exec_cksum) {
       /* Discard if the mutations change the paths or if it is too decremental
         in speed */
       if (cksum != exec_cksum ||
-          (stop_us - start_us > 2 * afl->queue_cur->exec_us)) {
+          (stop_us - start_us > 2 * afl->queue_cur->exec_us) && likely(!afl->fixed_seed)) {
 
         ranges = add_range(ranges, rng->start, rng->start + s / 2);
         ranges = add_range(ranges, rng->start + s / 2 + 1, rng->end);