mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
better cmp map fsrv fix
This commit is contained in:
@ -58,7 +58,9 @@ static list_t fsrv_list = {.element_prealloc_count = 0};
|
|||||||
|
|
||||||
static void fsrv_exec_child(afl_forkserver_t *fsrv, char **argv) {
|
static void fsrv_exec_child(afl_forkserver_t *fsrv, char **argv) {
|
||||||
|
|
||||||
if (fsrv->qemu_mode) setenv("AFL_DISABLE_LLVM_INSTRUMENTATION", "1", 0);
|
if (fsrv->qemu_mode) { setenv("AFL_DISABLE_LLVM_INSTRUMENTATION", "1", 0); }
|
||||||
|
|
||||||
|
unsetenv(CMPLOG_SHM_ENV_VAR); // we do not want that in non-cmplog fsrv
|
||||||
|
|
||||||
execv(fsrv->target_path, argv);
|
execv(fsrv->target_path, argv);
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ void cmplog_exec_child(afl_forkserver_t *fsrv, char **argv) {
|
|||||||
|
|
||||||
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);
|
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);
|
||||||
|
|
||||||
|
if (fsrv->qemu_mode) { setenv("AFL_DISABLE_LLVM_INSTRUMENTATION", "1", 0); }
|
||||||
|
|
||||||
if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary) {
|
if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary) {
|
||||||
|
|
||||||
argv[0] = fsrv->cmplog_binary;
|
argv[0] = fsrv->cmplog_binary;
|
||||||
|
@ -1515,21 +1515,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 *save_env = NULL;
|
|
||||||
if (afl->cmplog_binary) {
|
|
||||||
|
|
||||||
save_env = ck_strdup(getenv(CMPLOG_SHM_ENV_VAR));
|
|
||||||
unsetenv(CMPLOG_SHM_ENV_VAR); // normal forkserver should not have this
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
perform_dry_run(afl);
|
perform_dry_run(afl);
|
||||||
if (save_env) {
|
|
||||||
|
|
||||||
setenv(CMPLOG_SHM_ENV_VAR, save_env, 1); // needed for at_exit()
|
|
||||||
ck_free(save_env);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (!user_set_cache && afl->q_testcase_max_cache_size) {
|
if (!user_set_cache && afl->q_testcase_max_cache_size) {
|
||||||
|
Reference in New Issue
Block a user