(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-transaction-log.c) |
| |
| 282 | | | mail_transaction_log_refresh(struct mail_transaction_log *log, bool nfs_flush) |
| 283 | | | { |
| 284 | | | struct mail_transaction_log_file *file; |
| 285 | | | struct stat st; |
| 286 | | | const char *path; |
| 287 | | | |
| 288 | | | i_assert(log->head != NULL);
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". log->head != (void *)0 evaluates to true.
hide
Event 2:
Skipping " if". !(log->head != (void *)0) evaluates to false.
hide
Event 3:
Skipping " if". !!(log->head != (void *)0) evaluates to true.
hide
Event 4:
Skipping " if". !!!(log->head != (void *)0) evaluates to false.
hide
Event 5:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 289 | | | |
| 290 | | | if (MAIL_TRANSACTION_LOG_FILE_IN_MEMORY(log->head)) |
Event 6:
Skipping " if". log->head->fd == -1 evaluates to false.
hide
|
|
| 291 | | | return 0; |
| 292 | | | |
| 293 | | | path = t_strconcat(log->index->filepath, |
| 294 | | | MAIL_TRANSACTION_LOG_SUFFIX, NULL); |
| 295 | | | if (log->index->nfs_flush && nfs_flush) |
Event 7:
Skipping " if". - log->index->nfs_flush evaluates to true.
- nfs_flush evaluates to false.
hide
|
|
| 296 | | | nfs_flush_file_handle_cache(path); |
| 297 | [+] | | if (nfs_safe_stat(path, &st) < 0) { |
 |
| 298 | | | if (errno != ENOENT) {
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
| 299 | | | mail_index_file_set_syscall_error(log->index, path, |
| 300 | | | "stat()"); |
| 301 | | | return -1; |
| 302 | | | } |
| 303 | | | |
| 304 | | | |
| 305 | | | |
| 306 | | | file = log->head; |
| 307 | | | if (mail_transaction_log_create(log, FALSE) < 0) |
| 308 | | | return -1; |
| 309 | | | i_assert(file->refcount > 0);
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 |
| |
|
| 310 | | | file->refcount--; |
| 311 | | | log->index->need_recreate = TRUE; |
| 312 | | | return 0; |
| 313 | | | } else if (log->head->st_ino == st.st_ino && |
Event 10:
Skipping " if". - log->head->st_ino == st.st_ino evaluates to true.
- gnu_dev_major(...) == gnu_dev_major(...) evaluates to false.
hide
|
|
| 314 | | | CMP_DEV_T(log->head->st_dev, st.st_dev)) {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/compat.h |
| |
59 | # define CMP_DEV_T(a, b) (major(a) == major(b) && minor(a) == minor(b)) |
| |
x /usr/include/sys/sysmacros.h |
| |
65 | # define major(dev) gnu_dev_major (dev) |
| |
x /usr/include/sys/sysmacros.h |
| |
65 | # define major(dev) gnu_dev_major (dev) |
| |
x /usr/include/sys/sysmacros.h |
| |
66 | # define minor(dev) gnu_dev_minor (dev) |
| |
x /usr/include/sys/sysmacros.h |
| |
66 | # define minor(dev) gnu_dev_minor (dev) |
| |
|
| 315 | | | |
| 316 | | | |
| 317 | | | |
| 318 | | | |
| 319 | | | |
| 320 | | | return 0; |
| 321 | | | } |
| 322 | | | |
| 323 | [+] | | file = mail_transaction_log_file_alloc(log, path); |
 |
| 324 | [+] | | if (mail_transaction_log_file_open(file, FALSE) <= 0) { |
 |
| 325 | | | mail_transaction_log_file_free(&file); |
| 326 | | | return -1; |
| 327 | | | } |
| 328 | | | |
| 329 | | | i_assert(!file->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 21:
Skipping " if". !file->locked evaluates to true.
hide
Event 22:
Skipping " if". !!file->locked evaluates to false.
hide
Event 23:
Skipping " if". !!!file->locked evaluates to true.
hide
Event 24:
Skipping " if". !!!!file->locked evaluates to false.
hide
Event 25:
Skipping " if". __builtin_expect(...) evaluates to false.
hide
|
|
| 330 | | | |
| 331 | | | if (--log->head->refcount == 0) |
Event 26:
Taking true branch. --log->head->refcount == 0 evaluates to true.
hide
|
|
| 332 | [+] | | mail_transaction_logs_clean(log); |
Event 27:
log is passed to mail_transaction_logs_clean().
hide
|
|
 |
| 333 | [+] | | mail_transaction_log_set_head(log, file); |
Event 54:
log is passed to mail_transaction_log_set_head() as the first argument.
hide
|
|
 |
| |