fix regression in class lookup
MODIFY
docs/Changelog.md
docs/Changelog.md
@@ -13,6 +13,9 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- added AFL_IGNORE_PROBLEMS plus checks to identify and abort on
incorrect LTO usage setups and enhanced the READMEs for better
information on how to deal with instrumenting libraries
+ - fix a regression introduced in 3.10 that resulted in less
+ coverage being detected. thanks to Collin May for reporting!
+
- afl-cc:
- fix for shared linking on MacOS
- llvm and LTO mode verified to work with new llvm 14-dev

MODIFY
src/afl-fuzz-bitmap.c
src/afl-fuzz-bitmap.c
@@ -143,17 +143,9 @@ u32 count_non_255_bytes(afl_state_t *afl, u8 *mem) {
and replacing it with 0x80 or 0x01 depending on whether the tuple
is hit or not. Called on every new crash or timeout, should be
reasonably fast. */
-#define TIMES4(x) x, x, x, x
-#define TIMES8(x) TIMES4(x), TIMES4(x)
-#define TIMES16(x) TIMES8(x), TIMES8(x)
-#define TIMES32(x) TIMES16(x), TIMES16(x)
-#define TIMES64(x) TIMES32(x), TIMES32(x)
-#define TIMES255(x) \
- TIMES64(x), TIMES64(x), TIMES64(x), TIMES32(x), TIMES16(x), TIMES8(x), \
- TIMES4(x), x, x, x
const u8 simplify_lookup[256] = {
- [0] = 1, [1] = TIMES255(128)
+ [0] = 1, [1 ... 255] = 128
};
@@ -167,11 +159,11 @@ const u8 count_class_lookup8[256] = {
[1] = 1,
[2] = 2,
[3] = 4,
- [4] = TIMES4(8),
- [8] = TIMES8(16),
- [16] = TIMES16(32),
- [32] = TIMES32(64),
- [128] = TIMES64(128)
+ [4 ... 7] = 8,
+ [8 ... 15] = 16,
+ [16 ... 31] = 32,
+ [32 ... 127] = 64,
+ [128 ... 255] = 128
};

MODIFY
test/test-compcov.c
test/test-compcov.c
@@ -43,6 +43,7 @@ int main(int argc, char **argv) {
printf("This will only crash with libdislocator: %s\n", buf);
} else if (*(unsigned int *)input == 0xabadcafe)
+
printf("GG you eat cmp tokens for breakfast!\n");
else if (memcmp(cmpval, input, 8) == 0)
printf("local var memcmp works!\n");

MODIFY
unicorn_mode/unicornafl
unicorn_mode/unicornafl
-Subproject commit c0e03d2c6b55a22025324f121746b41b1e756fb8
+Subproject commit 019b871539fe9ed3f41d882385a8b02c243d49ad

MODIFY
utils/plot_ui/afl-plot-ui.c
utils/plot_ui/afl-plot-ui.c
@@ -170,3 +170,4 @@ static void plot_toggled(GtkWidget *caller, gpointer data) {
}
}
+

fix regression in class lookup