Newly introduced defects
List of Defects
Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c: scope_hint: In function ‘_daemonize’
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
# 2004| exit(EXIT_DESC_OPEN_FAILURE);
# 2005|
# 2006|-> if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007| (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2004| exit(EXIT_DESC_OPEN_FAILURE);
# 2005|
# 2006|-> if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007| (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
# 2004| exit(EXIT_DESC_OPEN_FAILURE);
# 2005|
# 2006|-> if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007| (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2004| exit(EXIT_DESC_OPEN_FAILURE);
# 2005|
# 2006|-> if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007| (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2007:50: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
# 2005|
# 2006| if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|-> (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
# 2009| exit(EXIT_DESC_OPEN_FAILURE);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2007:50: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2005|
# 2006| if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|-> (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008| (dup2(null_fd, STDERR_FILENO) == -1))
# 2009| exit(EXIT_DESC_OPEN_FAILURE);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2011:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2009| exit(EXIT_DESC_OPEN_FAILURE);
# 2010|
# 2011|-> if ((null_fd > STDERR_FILENO) && close(null_fd))
# 2012| exit(EXIT_DESC_CLOSE_FAILURE);
# 2013|
Error: CLANG_WARNING: [#def8]
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:1954:6: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1952| static void _text_destroy(struct format_type *fmt)
# 1953| {
# 1954|-> if (fmt->orphan_vg)
# 1955| free_orphan_vg(fmt->orphan_vg);
# 1956|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def9]
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c: scope_hint: In function ‘_text_destroy’
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:1954:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*fmt.orphan_vg’
lvm2-2.03.24-build/LVM2.2.03.24/lib/misc/lib.h:30: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:16: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/lib/log/log.h:105:23: note: in expansion of macro ‘LOG_LINE_WITH_ERRNO’
lvm2-2.03.24-build/LVM2.2.03.24/lib/log/log.h:115:28: note: in expansion of macro ‘log_err’
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:2622:17: note: in expansion of macro ‘log_error’
# 1952| static void _text_destroy(struct format_type *fmt)
# 1953| {
# 1954|-> if (fmt->orphan_vg)
# 1955| free_orphan_vg(fmt->orphan_vg);
# 1956|
Error: GCC_ANALYZER_WARNING (CWE-126): [#def10]
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c: scope_hint: In function ‘_print_val_man’
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:218:29: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:110: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:218:29: note: read of 1 byte from after the end of the region
# └─────────────────┘
# ^
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:17: included_from: Included from here.
/usr/include/string.h:350:14: note: argument 1 of ‘strstr’ must be a pointer to a null-terminated string
# 216| }
# 217|
# 218|-> if (strstr(line_argv[i], "Number"))
# 219| printf("\\fI%s\\fP", line_argv[i]);
# 220| else
Error: CLANG_WARNING: [#def11]
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:375:5: warning[deadcode.DeadStores]: Value stored to 'need_ro_indent_end' is never read
# 373| if ((cmd->ro_count > 2) && (sep == 2)) {
# 374| printf("\n.RS 5\n");
# 375|-> need_ro_indent_end = 1;
# 376| }
# 377|
Error: CLANG_WARNING: [#def12]
lvm2-2.03.24-build/LVM2.2.03.24/tools/toollib.c:2927:9: warning[deadcode.DeadStores]: Although the value stored to 'type' is used in the enclosing expression, the value is never actually read from 'type'
# 2925| continue;
# 2926|
# 2927|-> if (!(type = get_lv_type(lvt_enum)))
# 2928| continue;
# 2929|
Error: CLANG_WARNING: [#def13]
lvm2-2.03.24-build/LVM2.2.03.24/tools/toollib.c:2973:9: warning[deadcode.DeadStores]: Although the value stored to 'prop' is used in the enclosing expression, the value is never actually read from 'prop'
# 2971| continue;
# 2972|
# 2973|-> if (!(prop = get_lv_prop(lvp_enum)))
# 2974| continue;
# 2975|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
lvm2-2.03.24-build/LVM2.2.03.24/tools/vgcfgbackup.c: scope_hint: In function ‘_vg_backup_single’
lvm2-2.03.24-build/LVM2.2.03.24/tools/vgcfgbackup.c:68:20: warning[-Wanalyzer-malloc-leak]: leak of ‘_expand_filename(arg_value(cmd, 195), *vg.name, last_filename)’
# 66| return_ECMD_FAILED;
# 67|
# 68|-> if (!backup_to_file(filename, vg->cmd->cmd_line, vg))
# 69| return_ECMD_FAILED;
# 70| } else {
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-213.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | lvm2-2.03.23-1.fc40 |
diffbase-store-results-to | /tmp/tmpovaqkw0p/lvm2-2.03.23-1.fc40.tar.xz |
diffbase-time-created | 2024-07-03 16:07:54 |
diffbase-time-finished | 2024-07-03 16:13:29 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpovaqkw0p/lvm2-2.03.23-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpovaqkw0p/lvm2-2.03.23-1.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-213.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | lvm2-2.03.24-3.fc41 |
store-results-to | /tmp/tmp3wxqwdje/lvm2-2.03.24-3.fc41.tar.xz |
time-created | 2024-07-03 16:13:43 |
time-finished | 2024-07-03 16:19:01 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp3wxqwdje/lvm2-2.03.24-3.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp3wxqwdje/lvm2-2.03.24-3.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |