mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
fixes
This commit is contained in:
@ -986,6 +986,21 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
if (unlikely(afl->afl_env.afl_persistent_record)) {
|
||||
|
||||
afl->fsrv.persistent_record = atoi(afl->afl_env.afl_persistent_record);
|
||||
afl->fsrv.persistent_record_dir = alloc_printf("%s/crashes", afl->out_dir);
|
||||
|
||||
if (afl->fsrv.persistent_record < 2) {
|
||||
|
||||
FATAL(
|
||||
"AFL_PERSISTENT_RECORD value must be be at least 2, recommended is "
|
||||
"100 or 1000.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (afl->fsrv.qemu_mode && getenv("AFL_USE_QASAN")) {
|
||||
|
||||
u8 *preload = getenv("AFL_PRELOAD");
|
||||
@ -1239,29 +1254,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
if (unlikely(afl->afl_env.afl_persistent_record)) {
|
||||
|
||||
afl->fsrv.persistent_record = atoi(afl->afl_env.afl_persistent_record);
|
||||
afl->fsrv.persistent_record_dir = alloc_printf("%s/crashes", afl->out_dir);
|
||||
|
||||
if (afl->fsrv.persistent_record < 2) {
|
||||
|
||||
FATAL(
|
||||
"AFL_PERSISTENT_RECORD vallue must be be at least 2, recommended is "
|
||||
"100 or 1000.");
|
||||
|
||||
}
|
||||
|
||||
if (!getenv(PERSIST_ENV_VAR)) {
|
||||
|
||||
FATAL(
|
||||
"Target binary is not compiled in persistent mode, "
|
||||
"AFL_PERSISTENT_RECORD makes no sense.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (afl->afl_env.afl_crash_exitcode) {
|
||||
|
||||
long exitcode = strtol(afl->afl_env.afl_crash_exitcode, NULL, 10);
|
||||
@ -1531,6 +1523,18 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
check_binary(afl, argv[optind]);
|
||||
|
||||
if (unlikely(afl->fsrv.persistent_record)) {
|
||||
|
||||
if (!getenv(PERSIST_ENV_VAR)) {
|
||||
|
||||
FATAL(
|
||||
"Target binary is not compiled in persistent mode, "
|
||||
"AFL_PERSISTENT_RECORD makes no sense.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (afl->shmem_testcase_mode) { setup_testcase_shmem(afl); }
|
||||
|
||||
afl->start_time = get_cur_time();
|
||||
|
Reference in New Issue
Block a user