Autodictionary (#309)

* 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

* better map transfer, display snapshot in UI

* update readme
This commit is contained in:
van Hauser
2020-04-11 07:32:42 +02:00
committed by GitHub
parent 29ee3a1ffc
commit 68f269437d
7 changed files with 530 additions and 44 deletions

View File

@ -208,7 +208,7 @@ static void __afl_start_snapshots(void) {
assume we're not running in forkserver mode and just execute program. */
status |= (FS_OPT_ENABLED | FS_OPT_SNAPSHOT);
if (map_size <= 0x1000000)
if (map_size <= 0x800000)
status |= (FS_OPT_SET_MAPSIZE(map_size) | FS_OPT_MAPSIZE);
if (__afl_dictionary_len > 0 && __afl_dictionary) status |= FS_OPT_AUTODICT;
memcpy(tmp, &status, 4);
@ -373,7 +373,7 @@ static void __afl_start_forkserver(void) {
void (*old_sigchld_handler)(int) = 0; // = signal(SIGCHLD, SIG_DFL);
if (map_size <= 0x1000000)
if (map_size <= 0x800000)
status |= (FS_OPT_SET_MAPSIZE(map_size) | FS_OPT_MAPSIZE);
if (__afl_dictionary_len > 0 && __afl_dictionary) status |= FS_OPT_AUTODICT;
if (status) status |= (FS_OPT_ENABLED);