about summary refs log tree commit diff
path: root/patches/afl++-keep-all-crashes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/afl++-keep-all-crashes.patch')
-rw-r--r--patches/afl++-keep-all-crashes.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/afl++-keep-all-crashes.patch b/patches/afl++-keep-all-crashes.patch
new file mode 100644
index 0000000..e3ce8f6
--- /dev/null
+++ b/patches/afl++-keep-all-crashes.patch
@@ -0,0 +1,29 @@
+diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
+index f05bb7db59d5..de275e374ff1 100644
+--- a/src/afl-fuzz-bitmap.c
++++ b/src/afl-fuzz-bitmap.c
+@@ -556,7 +556,6 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault, u8 inc) {
+     if (likely(!new_bits && !new_paths)) {
+ 
+       if (unlikely(afl->crash_mode)) { ++afl->total_crashes; }
+-      return 0;
+ 
+     }
+ 
+@@ -837,16 +836,12 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault, u8 inc) {
+ 
+       ++afl->total_crashes;
+ 
+-      if (afl->saved_crashes >= KEEP_UNIQUE_CRASH) { return keeping; }
+-
+       if (likely(!afl->non_instrumented_mode)) {
+ 
+         if (!classified) { classify_counts(&afl->fsrv); }
+ 
+         simplify_trace(afl, afl->fsrv.trace_bits);
+ 
+-        if (!has_new_bits(afl, afl->virgin_crash)) { return keeping; }
+-
+       }
+ 
+       if (unlikely(!afl->saved_crashes) &&