Skip to content

Commit a5d4c8d

Browse files
Merge pull request AFLplusplus#340 from AFLplusplus/dev
dev -> master
2 parents 62ec52d + a46fe3a commit a5d4c8d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ sending a mail to <[email protected]>.
1313
- afl-fuzz:
1414
- AFL_MAP_SIZE was not working correctly
1515
- better python detection
16+
- an old, old bug in afl that would show negative stability in rare
17+
circumstances is now hopefully fixed
1618
- llvm_mode:
1719
- if LLVM 11 is installed the posix shm_open+mmap is used and a fixed
1820
address for the shared memory map is used as this increases the

llvm_mode/afl-llvm-common.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <string>
1313
#include <fstream>
1414

15+
#include <llvm/Support/raw_ostream.h>
1516
#include "afl-llvm-common.h"
1617

1718
using namespace llvm;

src/afl-fuzz-run.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem,
193193
if (q->exec_cksum) {
194194

195195
memcpy(afl->first_trace, afl->fsrv.trace_bits, afl->fsrv.map_size);
196+
u8 hnb = has_new_bits(afl, afl->virgin_bits);
197+
if (hnb > new_bits) { new_bits = hnb; }
196198

197199
}
198200

@@ -226,12 +228,11 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem,
226228
}
227229

228230
cksum = hash32(afl->fsrv.trace_bits, afl->fsrv.map_size, HASH_CONST);
231+
u8 hnb = has_new_bits(afl, afl->virgin_bits);
232+
if (hnb > new_bits) { new_bits = hnb; }
229233

230234
if (q->exec_cksum != cksum) {
231235

232-
u8 hnb = has_new_bits(afl, afl->virgin_bits);
233-
if (hnb > new_bits) { new_bits = hnb; }
234-
235236
if (q->exec_cksum) {
236237

237238
u32 i;

0 commit comments

Comments
 (0)