Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:83: included_from: Included from here.
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c: scope_hint: In function ‘daemonize’
nilfs-utils-2.2.11/include/util.h:13:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:768:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:768:21: note: in expansion of macro ‘unlikely’
#   11|   /* likely() and unlikely() macros */
#   12|   #define likely(x)	__builtin_expect(!!(x), 1)
#   13|-> #define unlikely(x)	__builtin_expect(!!(x), 0)
#   14|   
#   15|   #ifndef BUG

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
nilfs-utils-2.2.11/include/util.h:13:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:770:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:770:21: note: in expansion of macro ‘unlikely’
#   11|   /* likely() and unlikely() macros */
#   12|   #define likely(x)	__builtin_expect(!!(x), 1)
#   13|-> #define unlikely(x)	__builtin_expect(!!(x), 0)
#   14|   
#   15|   #ifndef BUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
nilfs-utils-2.2.11/lib/gc.c:502:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ss’
nilfs-utils-2.2.11/include/nilfs.h:114:1: note: in expansion of macro ‘NILFS_LOCK_FNS’
nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
#  500|   	n = nilfs_get_snapshot(nilfs, &ss);
#  501|   	if (unlikely(n < 0))
#  502|-> 		return n;
#  503|   
#  504|   	last_hit = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
nilfs-utils-2.2.11/lib/realpath.c: scope_hint: In function ‘myrealpath’
nilfs-utils-2.2.11/lib/realpath.c:136:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘path’
#  134|   			}
#  135|   			memcpy(buf, link_path, n);
#  136|-> 			memcpy(buf + n, path, m + 1);
#  137|   			path = buf;
#  138|   #endif

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.3
diffbase-analyzer-version-cppcheck2.13.0
diffbase-analyzer-version-gcc14.0.1
diffbase-analyzer-version-gcc-analyzer14.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-149.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namenilfs-utils-2.2.9-6.fc40
diffbase-store-results-to/tmp/tmpx4u3lrez/nilfs-utils-2.2.9-6.fc40.tar.xz
diffbase-time-created2024-04-22 11:03:34
diffbase-time-finished2024-04-22 11:05:20
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpx4u3lrez/nilfs-utils-2.2.9-6.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpx4u3lrez/nilfs-utils-2.2.9-6.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-149.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namenilfs-utils-2.2.11-1.fc41
store-results-to/tmp/tmpeewajutx/nilfs-utils-2.2.11-1.fc41.tar.xz
time-created2024-04-22 11:05:30
time-finished2024-04-22 11:06:42
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpeewajutx/nilfs-utils-2.2.11-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpeewajutx/nilfs-utils-2.2.11-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9