Branch Coverage

src/core.c
Criterion Covered Total %
branch 90 148 60.8


line true false branch
68 384 3 for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
75 3968 31 for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
3968 31 for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
82 3584 28 for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
92 28 0 if (memory == NULL) {
97 28 0 if (size != 0 && memory_size / size != num) {
28 0 if (size != 0 && memory_size / size != num) {
102 0 28 if (context->allocate_cbk) {
108 28 0 if (*memory == NULL) {
119 0 28 if (context->free_cbk) {
150 8071 0 if (FLAG_clear_internal_memory && v) {
8071 0 if (FLAG_clear_internal_memory && v) {
156 28 0 if (context != NULL && instance != NULL) {
163 3 28 for (l = 1; l < instance->lanes; ++l) {
206 4982209 5178880 if (0 == position->pass) {
208 1245506 3736703 if (0 == position->slice) {
213 3736440 263 if (same_lane) {
220 257 6 position->slice * instance->segment_length +
226 5178502 378 if (same_lane) {
232 366 12 instance->segment_length +
247 5178879 4982210 if (0 != position->pass) {
250 3884159 1294720 : (position->slice + 1) * instance->segment_length;
263 53 25 for (r = 0; r < instance->passes; ++r) {
264 212 53 for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
265 212 212 for (l = 0; l < instance->lanes; ++l) {
300 3 0 if (thread == NULL) {
306 3 0 if (thr_data == NULL) {
311 6 3 for (r = 0; r < instance->passes; ++r) {
312 24 6 for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
316 48 24 for (l = 0; l < instance->lanes; ++l) {
320 0 48 if (l >= instance->threads) {
321 0 0 if (argon2_thread_join(thread[l - instance->threads])) {
336 0 48 if (argon2_thread_create(&thread[l], &fill_segment_thr,
339 0 0 for (ll = 0; ll < l; ++ll)
350 48 24 for (l = instance->lanes - instance->threads; l < instance->lanes;
352 48 0 if (argon2_thread_join(thread[l])) {
365 3 0 if (thread != NULL) {
368 3 0 if (thr_data != NULL) {
377 28 0 if (instance == NULL || instance->lanes == 0) {
28 0 if (instance == NULL || instance->lanes == 0) {
384 25 3 fill_memory_blocks_st(instance) : fill_memory_blocks_mt(instance);
389 47 0 if (NULL == context) {
393 47 0 if (NULL == context->out) {
398 47 0 if (ARGON2_MIN_OUTLEN > context->outlen) {
407 0 47 if (NULL == context->pwd) {
408 0 0 if (0 != context->pwdlen) {
422 0 47 if (NULL == context->salt) {
423 0 0 if (0 != context->saltlen) {
428 47 0 if (ARGON2_MIN_SALT_LENGTH > context->saltlen) {
437 47 0 if (NULL == context->secret) {
438 47 0 if (0 != context->secretlen) {
451 47 0 if (NULL == context->ad) {
452 47 0 if (0 != context->adlen) {
465 47 0 if (ARGON2_MIN_MEMORY > context->m_cost) {
473 47 0 if (context->m_cost < 8 * context->lanes) {
478 47 0 if (ARGON2_MIN_TIME > context->t_cost) {
487 47 0 if (ARGON2_MIN_LANES > context->lanes) {
491 47 0 if (ARGON2_MAX_LANES < context->lanes) {
496 47 0 if (ARGON2_MIN_THREADS > context->threads) {
500 47 0 if (ARGON2_MAX_THREADS < context->threads) {
504 0 47 if (NULL != context->allocate_cbk && NULL == context->free_cbk) {
0 0 if (NULL != context->allocate_cbk && NULL == context->free_cbk) {
508 47 0 if (NULL == context->allocate_cbk && NULL != context->free_cbk) {
47 0 if (NULL == context->allocate_cbk && NULL != context->free_cbk) {
520 31 28 for (l = 0; l < instance->lanes; ++l) {
543 28 0 if (NULL == context || NULL == blockhash) {
570 28 0 if (context->pwd != NULL) {
574 0 28 if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) {
583 28 0 if (context->salt != NULL) {
591 0 28 if (context->secret != NULL) {
595 0 0 if (context->flags & ARGON2_FLAG_CLEAR_SECRET) {
604 0 28 if (context->ad != NULL) {
616 28 0 if (instance == NULL || context == NULL)
623 28 0 if (result != ARGON2_OK) {