increase fast resume version

This commit is contained in:
vanhauser-thc
2025-04-07 10:13:13 +02:00
parent fc38904e25
commit 7c349b6cde
4 changed files with 11 additions and 7 deletions

View File

@ -9,6 +9,7 @@
- Small improvements to afl-*-config - Small improvements to afl-*-config
- afl-fuzz: - afl-fuzz:
- memory leak fixes by @kcwu - thanks! - memory leak fixes by @kcwu - thanks!
- some more nits and small memory saves thanks to @kcwu
- frida_mode: - frida_mode:
- fixes for new MacOS + M4 hardware - fixes for new MacOS + M4 hardware

View File

@ -353,6 +353,8 @@ enum {
}; };
#define FAST_RESUME_VERSION 0x01000000
/* Python stuff */ /* Python stuff */
#ifdef USE_PYTHON #ifdef USE_PYTHON

View File

@ -39,10 +39,10 @@ enum SanitizerAbstraction {
SIMPLIFY_TRACE = 0, // Feed all simplified trace to sanitizers, moderate SIMPLIFY_TRACE = 0, // Feed all simplified trace to sanitizers, moderate
// sensitive and default for SAND. Not missing bugs. // sensitive and default for SAND. Not missing bugs.
UNIQUE_TRACE, // Feed all unique trace to sanitizers, the most sensitive UNIQUE_TRACE, // Feed all unique trace to sanitizers, the most sensitive
// and not missing bugs. // and not missing bugs.
COVERAGE_INCREASE // Feed all coverage increasing cases to sanitizers, the COVERAGE_INCREASE // Feed all coverage increasing cases to sanitizers, the
// least sensitive at a risk of missing ~20% bugs. // least sensitive at a risk of missing ~20% bugs.
}; };

View File

@ -2326,8 +2326,8 @@ int main(int argc, char **argv_orig, char **envp) {
u8 ver_string[8]; u8 ver_string[8];
u64 *ver = (u64 *)ver_string; u64 *ver = (u64 *)ver_string;
u64 expect_ver = u64 expect_ver = FAST_RESUME_VERSION + afl->shm.cmplog_mode +
afl->shm.cmplog_mode + (sizeof(struct queue_entry) << 1); (sizeof(struct queue_entry) << 1);
if (NZLIBREAD(fr_fd, ver_string, sizeof(ver_string)) != if (NZLIBREAD(fr_fd, ver_string, sizeof(ver_string)) !=
sizeof(ver_string)) sizeof(ver_string))
@ -3546,7 +3546,8 @@ stop_fuzzing:
u8 ver_string[8]; u8 ver_string[8];
u32 w = 0; u32 w = 0;
u64 *ver = (u64 *)ver_string; u64 *ver = (u64 *)ver_string;
*ver = afl->shm.cmplog_mode + (sizeof(struct queue_entry) << 1); *ver = FAST_RESUME_VERSION + afl->shm.cmplog_mode +
(sizeof(struct queue_entry) << 1);
ZLIBWRITE(fr_fd, ver_string, sizeof(ver_string), "ver_string"); ZLIBWRITE(fr_fd, ver_string, sizeof(ver_string), "ver_string");
ZLIBWRITE(fr_fd, afl->virgin_bits, afl->fsrv.map_size, "virgin_bits"); ZLIBWRITE(fr_fd, afl->virgin_bits, afl->fsrv.map_size, "virgin_bits");