mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
Exit on time (#904)
* Variable AFL_EXIT_ON_TIME description has been added. Variables AFL_EXIT_ON_TIME and afl_exit_on_time has been added. afl->exit_on_time variable initialization has been added. The asignment of a value to the afl->afl_env.afl_exit_on_time variable from environment variables has been added. Code to exit on timeout if new path not found has been added. * Type of afl_exit_on_time variable has been changed. Variable exit_on_time has been added to the afl_state_t structure. * Command `export AFL_EXIT_WHEN_DONE=1` has been added. * Millisecond to second conversion has been added. Call get_cur_time() has been added. * Revert to using the saved current time value. * Useless check has been removed.
This commit is contained in:
committed by
GitHub
parent
2fd9629478
commit
069e61dfc6
@ -574,6 +574,16 @@ void show_stats(afl_state_t *afl) {
|
||||
|
||||
}
|
||||
|
||||
/* AFL_EXIT_ON_TIME. */
|
||||
|
||||
if (unlikely(afl->last_path_time && !afl->non_instrumented_mode &&
|
||||
afl->afl_env.afl_exit_on_time &&
|
||||
(cur_ms - afl->last_path_time) > afl->exit_on_time)) {
|
||||
|
||||
afl->stop_soon = 2;
|
||||
|
||||
}
|
||||
|
||||
if (unlikely(afl->total_crashes && afl->afl_env.afl_bench_until_crash)) {
|
||||
|
||||
afl->stop_soon = 2;
|
||||
|
Reference in New Issue
Block a user