fix timeout detection to only reset on VM reset

reset_timeout_detection() is already called at end of NEXT_PAYLOAD
handler to properly re-init the timer on every new execution.

Remove the additional call in synchronization_lock() which prevents
proper timeout on targets that do a lot of hprintf().

Also remove extra call in synchronization_lock_timeout_found() which
really just seems to be a duplicate with no observable effect.

To reproduce, run a harness that uses hprintf() in infinite loop. It
will take longer due to execute due to userland overhead but should
eventually return with aux_buffer/runtime similar to configured timeout.
This commit is contained in:
Steffen Schulz 2022-05-02 08:21:53 -07:00 committed by Sergej Schumilo
parent 35809c5207
commit 9e56f6731e

View File

@ -232,8 +232,6 @@ void synchronization_lock(void){
runtime_sec, runtime_usec,
GET_GLOBAL_STATE()->num_dirty_pages);
reset_timeout_detector(&(GET_GLOBAL_STATE()->timeout_detector));
if(synchronization_check_page_not_found()){
set_success_auxiliary_result_buffer(GET_GLOBAL_STATE()->auxilary_buffer, 0);
}
@ -343,7 +341,6 @@ void synchronization_lock_timeout_found(void){
handle_tmp_snapshot_state();
set_timeout_auxiliary_result_buffer(GET_GLOBAL_STATE()->auxilary_buffer);
reset_timeout_detector(&(GET_GLOBAL_STATE()->timeout_detector));
perform_reload();