(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-cache.c) |
| |
| 541 | | | mail_cache_lock_full(struct mail_cache *cache, bool require_same_reset_id, |
| 542 | | | bool nonblock) |
| 543 | | | { |
| 544 | | | const struct mail_index_ext *ext; |
| 545 | | | struct mail_index_view *iview; |
| 546 | | | uint32_t reset_id; |
| 547 | | | int i, ret; |
| 548 | | | |
| 549 | | | i_assert(!cache->locked);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
189 | #define i_assert(expr) STMT_START{ \ |
190 | if (unlikely(!(expr))) \ |
191 | i_panic("file %s: line %d (%s): assertion failed: (%s)", \ |
192 | __FILE__, \ |
193 | __LINE__, \ |
194 | __PRETTY_FUNCTION__, \ |
195 | #expr); }STMT_END |
| |
|
Event 1:
Skipping " if". !cache->locked evaluates to true.
hide
Event 2:
Skipping " if". !!cache->locked evaluates to false.
hide
Event 3:
Skipping " if". !!!cache->locked evaluates to true.
hide
Event 4:
Skipping " if". !!!!cache->locked evaluates to false.
hide
Event 5:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 550 | | | |
| 551 | | | if (!cache->opened) |
Event 6:
Taking true branch. cache->opened evaluates to false.
hide
|
|
| 552 | [+] | | (void)mail_cache_open_and_verify(cache); |
Event 7:
cache is passed to mail_cache_open_and_verify().
hide
|
|
 |
| 553 | | | |
| 554 | | | if (MAIL_CACHE_IS_UNUSABLE(cache) || |
Event 28:
Skipping " if". - cache->hdr == (void *)0 evaluates to false.
- cache->index->dir == (void *)0 evaluates to false.
hide
|
|
| 555 | | | MAIL_INDEX_IS_IN_MEMORY(cache->index)) |
| 556 | | | return 0; |
| 557 | | | |
| 558 | | | iview = mail_index_view_open(cache->index); |
| 559 | | | ext = mail_index_view_get_ext(iview, cache->ext_id); |
| 560 | | | reset_id = ext == NULL ? 0 : ext->reset_id; |
Event 29:
ext == (void *)0 evaluates to true.
hide
|
|
| 561 | | | mail_index_view_close(&iview); |
| 562 | | | |
| 563 | | | if (ext == NULL && require_same_reset_id) { |
Event 30:
Skipping " if". - ext == (void *)0 evaluates to true.
- require_same_reset_id evaluates to false.
hide
|
|
| 564 | | | |
| 565 | | | return 0; |
| 566 | | | } |
| 567 | | | |
| 568 | | | for (i = 0; i < 3; i++) { |
Event 31:
Entering loop body. i < 3 evaluates to true.
hide
|
|
| 569 | | | if (cache->hdr->file_seq != reset_id && |
Event 32:
Skipping " if". cache->hdr->file_seq != reset_id evaluates to false.
hide
|
|
| 570 | | | (require_same_reset_id || i == 0)) { |
| 571 | | | |
| 572 | | | if (reset_id < cache->hdr->file_seq) { |
| 573 | | | |
| 574 | | | |
| 575 | | | |
| 576 | | | ret = 0; |
| 577 | | | break; |
| 578 | | | } |
| 579 | | | ret = mail_cache_reopen(cache); |
| 580 | | | if (ret < 0 || (ret == 0 && require_same_reset_id)) |
| 581 | | | break; |
| 582 | | | } |
| 583 | | | |
| 584 | [+] | | if ((ret = mail_cache_lock_file(cache, nonblock)) <= 0) { |
Event 33:
cache is passed to mail_cache_lock_file() as the first argument.
hide
|
|
 |
| |