fix attempt

This commit is contained in:
vanhauser-thc
2021-03-17 01:08:10 +01:00
parent 65b90001f6
commit f59ef29c26

View File

@ -1539,9 +1539,9 @@ int main(int argc, char **argv_orig, char **envp) {
&afl->fsrv, afl->argv, &afl->stop_soon, afl->afl_env.afl_debug_child); &afl->fsrv, afl->argv, &afl->stop_soon, afl->afl_env.afl_debug_child);
// only reinitialize when it makes sense // only reinitialize when it makes sense
if ((map_size < new_map_size || if ((map_size < new_map_size /*||
(new_map_size != MAP_SIZE && new_map_size < map_size && (new_map_size != MAP_SIZE && new_map_size < map_size &&
map_size - new_map_size > MAP_SIZE))) { map_size - new_map_size > MAP_SIZE)*/)) {
OKF("Re-initializing maps to %u bytes", new_map_size); OKF("Re-initializing maps to %u bytes", new_map_size);
@ -1570,8 +1570,6 @@ int main(int argc, char **argv_orig, char **envp) {
} }
afl->fsrv.map_size = map_size;
} }
if (afl->cmplog_binary) { if (afl->cmplog_binary) {
@ -1629,16 +1627,14 @@ int main(int argc, char **argv_orig, char **envp) {
afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon, afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon,
afl->afl_env.afl_debug_child); afl->afl_env.afl_debug_child);
} else {
afl->cmplog_fsrv.map_size = new_map_size;
} }
OKF("Cmplog forkserver successfully started"); OKF("Cmplog forkserver successfully started");
} }
fprintf(stderr, "NORMAL %u, CMPLOG %u\n", afl->fsrv.map_size, afl->cmplog_fsrv.map_size);
load_auto(afl); load_auto(afl);
if (extras_dir_cnt) { if (extras_dir_cnt) {