mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 01:31:37 +00:00
remove warnings
This commit is contained in:
parent
55224e5150
commit
ab394836a9
@ -390,7 +390,8 @@ typedef struct afl_env_vars {
|
||||
*afl_hang_tmout, *afl_forksrv_init_tmout, *afl_skip_crashes, *afl_preload,
|
||||
*afl_max_det_extras, *afl_statsd_host, *afl_statsd_port,
|
||||
*afl_crash_exitcode, *afl_statsd_tags_flavor, *afl_testcache_size,
|
||||
*afl_testcache_entries, *afl_kill_signal, *afl_target_env, *afl_persistent_record;
|
||||
*afl_testcache_entries, *afl_kill_signal, *afl_target_env,
|
||||
*afl_persistent_record;
|
||||
|
||||
} afl_env_vars_t;
|
||||
|
||||
|
@ -77,8 +77,9 @@
|
||||
|
||||
/* If a persistent target keeps state and found crashes are not reproducable
|
||||
then enable this option and set the AFL_PERSISTENT_RECORD env variable
|
||||
to a number. These number of testcases prior the crash will be kept and
|
||||
also written to the crash/ directory */
|
||||
to a number. These number of testcases prior and including the crash case
|
||||
will be kept and written to the crash/ directory as RECORD:... files.
|
||||
Note that every crash will be written, not only unique ones! */
|
||||
|
||||
//#define AFL_PERSISTENT_RECORD
|
||||
|
||||
|
@ -95,13 +95,15 @@ typedef struct afl_forkserver {
|
||||
char *cmplog_binary; /* the name of the cmplog binary */
|
||||
|
||||
/* persistent mode replay functionality */
|
||||
u32 persistent_record; /* persistent replay setting */
|
||||
u32 persistent_record_idx; /* persistent replay cache ptr */
|
||||
u32 persistent_record_cnt; /* persistent replay counter */
|
||||
u8 * persistent_record_dir;
|
||||
u8 ** persistent_record_data;
|
||||
u32 * persistent_record_len;
|
||||
s32 persistent_record_pid;
|
||||
u32 persistent_record; /* persistent replay setting */
|
||||
#ifdef AFL_PERSISTENT_RECORD
|
||||
u32 persistent_record_idx; /* persistent replay cache ptr */
|
||||
u32 persistent_record_cnt; /* persistent replay counter */
|
||||
u8 * persistent_record_dir;
|
||||
u8 **persistent_record_data;
|
||||
u32 *persistent_record_len;
|
||||
s32 persistent_record_pid;
|
||||
#endif
|
||||
|
||||
/* Function to kick off the forkserver child */
|
||||
void (*init_child_func)(struct afl_forkserver *fsrv, char **argv);
|
||||
|
@ -380,6 +380,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (fsrv->use_fauxsrv) {
|
||||
@ -1073,6 +1074,7 @@ void afl_fsrv_write_to_testcase(afl_forkserver_t *fsrv, u8 *buf, size_t len) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (likely(fsrv->use_shmem_fuzz && fsrv->shmem_fuzz)) {
|
||||
@ -1206,6 +1208,7 @@ fsrv_run_result_t afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
|
||||
fsrv->persistent_record_len[idx] = val;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (fsrv->child_pid <= 0) {
|
||||
@ -1336,6 +1339,7 @@ fsrv_run_result_t afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
|
||||
++fsrv->persistent_record_cnt;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* For a proper crash, set last_kill_signal to WTERMSIG, else set it to 0 */
|
||||
|
@ -1034,7 +1034,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
if (unlikely(afl->afl_env.afl_persistent_record)) {
|
||||
|
||||
#ifdef AFL_PERSISTENT_RECORD
|
||||
#ifdef AFL_PERSISTENT_RECORD
|
||||
|
||||
afl->fsrv.persistent_record = atoi(afl->afl_env.afl_persistent_record);
|
||||
|
||||
@ -1046,11 +1046,13 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
|
||||
FATAL("afl-fuzz was not compiled with AFL_PERSISTENT_RECORD enabled in config.h!");
|
||||
FATAL(
|
||||
"afl-fuzz was not compiled with AFL_PERSISTENT_RECORD enabled in "
|
||||
"config.h!");
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -1520,6 +1522,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
check_binary(afl, argv[optind]);
|
||||
|
||||
#ifdef AFL_PERSISTENT_RECORD
|
||||
if (unlikely(afl->fsrv.persistent_record)) {
|
||||
|
||||
if (!getenv(PERSIST_ENV_VAR)) {
|
||||
@ -1534,6 +1537,8 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (afl->shmem_testcase_mode) { setup_testcase_shmem(afl); }
|
||||
|
||||
afl->start_time = get_cur_time();
|
||||
|
@ -955,7 +955,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (in_dir) {
|
||||
|
||||
/* If we don't have a file name chosen yet, use a safe default. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user