From ac3ccfcc510b2b83efba17e621c7f1e7c4eacf9c Mon Sep 17 00:00:00 2001
From: pelle
Date: Mon, 19 Jul 2021 11:07:24 +0200
Subject: [PATCH] Run init() and loop_prepare() during autotune to prevent
possible corruptions during loop().
---
src/autotune.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/autotune.c b/src/autotune.c
index 04f8bc4c5..069847004 100644
--- a/src/autotune.c
+++ b/src/autotune.c
@@ -50,6 +50,13 @@ static double try_run (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
}
else
{
+ run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 0, kernel_power_try, true, 0);
+
+ if (hashconfig->opts_type & OPTS_TYPE_LOOP_PREPARE)
+ {
+ run_kernel (hashcat_ctx, device_param, KERN_RUN_2P, 0, kernel_power_try, true, 0);
+ }
+
run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 0, kernel_power_try, true, 0);
}