mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
LTO optimization, variable map size, autodictionary (#307)
* lto module clean-up * step 1/3 * step 1/3 completed * if tmp is ever made non-static * parts 2 and 3 - autodictionary is complete * variable map_size support * variable map size: changed overlooked functions * remove debug for autodict * 64 bit alignment of map size * fix review comments * force 64 bit alignment on both sides * typo
This commit is contained in:
@ -305,10 +305,14 @@ static inline u8 memcmp_nocase(u8 *m1, u8 *m2, u32 len) {
|
||||
}
|
||||
|
||||
/* Maybe add automatic extra. */
|
||||
/* Ugly hack: afl state is transfered as u8* because we import data via
|
||||
afl-forkserver.c - which is shared with other afl tools that do not
|
||||
have the afl state struct */
|
||||
|
||||
void maybe_add_auto(afl_state_t *afl, u8 *mem, u32 len) {
|
||||
void maybe_add_auto(void *afl_tmp, u8 *mem, u32 len) {
|
||||
|
||||
u32 i;
|
||||
afl_state_t *afl = (afl_state_t *)afl_tmp;
|
||||
u32 i;
|
||||
|
||||
/* Allow users to specify that they don't want auto dictionaries. */
|
||||
|
||||
@ -469,7 +473,7 @@ void load_auto(afl_state_t *afl) {
|
||||
if (len < 0) PFATAL("Unable to read from '%s'", fn);
|
||||
|
||||
if (len >= MIN_AUTO_EXTRA && len <= MAX_AUTO_EXTRA)
|
||||
maybe_add_auto(afl, tmp, len);
|
||||
maybe_add_auto((u8 *)afl, tmp, len);
|
||||
|
||||
close(fd);
|
||||
ck_free(fn);
|
||||
|
Reference in New Issue
Block a user