mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-13 19:28:56 +00:00
Fix initialization of size_pws_amp
This commit is contained in:
parent
58d1dedd1e
commit
1432446734
@ -272,7 +272,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
|
||||
if (hashconfig->attack_exec == ATTACK_EXEC_OUTSIDE_KERNEL)
|
||||
{
|
||||
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_pws_amp_buf, 0, device_param->size_pws);
|
||||
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_pws_amp_buf, 0, device_param->size_pws_amp);
|
||||
|
||||
if (CL_rc == -1) return -1;
|
||||
}
|
||||
|
17
src/opencl.c
17
src/opencl.c
@ -3955,6 +3955,8 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
const size_t size_pws = kernel_power_max * sizeof (pw_t);
|
||||
|
||||
const size_t size_pws_amp = size_pws;
|
||||
|
||||
// size_tmps
|
||||
|
||||
const size_t size_tmps = kernel_power_max * hashconfig->tmp_size;
|
||||
@ -3980,7 +3982,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
+ size_markov_css
|
||||
+ size_plains
|
||||
+ size_pws
|
||||
+ size_pws // not a bug
|
||||
+ size_pws_amp
|
||||
+ size_results
|
||||
+ size_root_css
|
||||
+ size_rules
|
||||
@ -4064,9 +4066,10 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
// find out if we would request too much memory on memory blocks which are based on kernel_accel
|
||||
|
||||
size_t size_pws = 4;
|
||||
size_t size_tmps = 4;
|
||||
size_t size_hooks = 4;
|
||||
size_t size_pws = 4;
|
||||
size_t size_pws_amp = 4;
|
||||
size_t size_tmps = 4;
|
||||
size_t size_hooks = 4;
|
||||
|
||||
while (kernel_accel_max >= kernel_accel_min)
|
||||
{
|
||||
@ -4076,6 +4079,8 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
size_pws = kernel_power_max * sizeof (pw_t);
|
||||
|
||||
size_pws_amp = (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? 1 : size_pws;
|
||||
|
||||
// size_tmps
|
||||
|
||||
size_tmps = kernel_power_max * hashconfig->tmp_size;
|
||||
@ -4110,7 +4115,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
+ size_markov_css
|
||||
+ size_plains
|
||||
+ size_pws
|
||||
+ size_pws // not a bug
|
||||
+ size_pws_amp
|
||||
+ size_results
|
||||
+ size_root_css
|
||||
+ size_rules
|
||||
@ -4158,8 +4163,6 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
*/
|
||||
|
||||
const size_t size_pws_amp = (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? size_pws : size_pws;
|
||||
|
||||
device_param->size_bfs = size_bfs;
|
||||
device_param->size_combs = size_combs;
|
||||
device_param->size_rules = size_rules;
|
||||
|
@ -455,7 +455,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
device_param->kernel_params[18] = &device_param->d_esalt_bufs;
|
||||
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_pws_buf, device_param->size_pws); if (CL_rc == -1) return -1;
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_pws_amp_buf, device_param->size_pws); if (CL_rc == -1) return -1;
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_pws_amp_buf, device_param->size_pws_amp); if (CL_rc == -1) return -1;
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_tmps, device_param->size_tmps); if (CL_rc == -1) return -1;
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_hooks, device_param->size_hooks); if (CL_rc == -1) return -1;
|
||||
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_plain_bufs, device_param->size_plains); if (CL_rc == -1) return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user