Error: SHELLCHECK_WARNING (CWE-477): [#def1] /usr/sbin/fsck.xfs:63:16: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 61| *i*) FORCE=false ;; # 62| esac # 63|-> if [ -n "$PS1" -o -t 0 ]; then # 64| FORCE=false # 65| fi Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] xfsprogs-6.9.0-build/xfsprogs-6.9.0/db/namei.c: scope_hint: In function ‘dir_emit’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/db/namei.c:270:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘display_name’ where non-null expected xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/linux.h:18: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/xfs.h:9: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/libxfs.h:17: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/db/namei.c:6: included_from: Included from here. <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 268| */ # 269| display_name = malloc(namelen + 1); # 270|-> memcpy(display_name, name, namelen); # 271| display_name[namelen] = 0; # 272| xname.len = namelen; Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c: scope_hint: In function ‘check_parent_entry’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c:88:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘parent’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c: scope_hint: In function ‘check_parent_entry’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/platform_defs.h:10: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/libfrog/projects.h:9: included_from: Included from here. # 86| return; # 87| } else { # 88|-> if (parent->p_ino != statbuf.st_ino) { # 89| fprintf(stderr, # 90| _("inode-path for inode: %llu is incorrect - wrong parent inode#\n"), Error: GCC_ANALYZER_WARNING (CWE-415): [#def4] xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c: scope_hint: In function ‘parent_check’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c:263:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘parentbuf’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c: scope_hint: In function ‘parent_check’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/platform_defs.h:35: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/io/parent.c:256:33: note: in expansion of macro ‘_’ # 261| out: # 262| free(bstatbuf); # 263|-> free(parentbuf); # 264| free(fshandlep); # 265| return err_status; Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] xfsprogs-6.9.0-build/xfsprogs-6.9.0/libxfs/xfs_da_btree.c: scope_hint: In function 'xfs_da_grow_inode_int' xfsprogs-6.9.0-build/xfsprogs-6.9.0/libxfs/xfs_da_btree.c:2224:36: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mapp' # 2222| for (i = 0, got = 0; i < mapi; i++) # 2223| got += mapp[i].br_blockcount; # 2224|-> if (got != count || mapp[0].br_startoff != *bno || # 2225| mapp[mapi - 1].br_startoff + mapp[mapi - 1].br_blockcount != # 2226| *bno + count) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] xfsprogs-6.9.0-build/xfsprogs-6.9.0/repair/phase6.c: scope_hint: In function ‘longform_dir2_entry_check’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/repair/phase6.c:2376:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bp’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/repair/phase6.c:3208:23: note: in expansion of macro ‘list_entry’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/repair/phase6.c:328:34: note: in expansion of macro ‘DIR_HASH_TAB_SIZE’ # 2374| xfs_dir2_leaf_entry_t *blp; # 2375| # 2376|-> block = bp->b_addr; # 2377| btp = xfs_dir2_block_tail_p(mp->m_dir_geo, block); # 2378| blp = xfs_dir2_block_leaf_p(btp); Error: GCC_ANALYZER_WARNING (CWE-688): [#def7] xfsprogs-6.9.0-build/xfsprogs-6.9.0/spaceman/freesp.c: scope_hint: In function ‘histinit’ xfsprogs-6.9.0-build/xfsprogs-6.9.0/spaceman/freesp.c:105:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/platform_defs.h:15: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/include/libxfs.h:16: included_from: Included from here. xfsprogs-6.9.0-build/xfsprogs-6.9.0/spaceman/freesp.c:9: included_from: Included from here. /usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null # 103| if (!seen1) # 104| addhistent(1); # 105|-> qsort(hist, histcount, sizeof(*hist), hcmp); # 106| } # 107| for (i = 0; i < histcount; i++) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] xfsprogs-6.9.0-build/xfsprogs-6.9.0/spaceman/freesp.c:109:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 107| for (i = 0; i < histcount; i++) { # 108| if (i < histcount - 1) # 109|-> hist[i].high = hist[i + 1].low - 1; # 110| else # 111| hist[i].high = maxlen; Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] xfsprogs-6.9.0-build/xfsprogs-6.9.0/spaceman/freesp.c:111:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 109| hist[i].high = hist[i + 1].low - 1; # 110| else # 111|-> hist[i].high = maxlen; # 112| } # 113| }
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-203.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | xfsprogs-6.11.0-1.fc42 |
diffbase-store-results-to | /tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.tar.xz |
diffbase-time-created | 2024-11-13 03:38:30 |
diffbase-time-finished | 2024-11-13 03:42:09 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-203.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | xfsprogs-6.9.0-1.fc41 |
store-results-to | /tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.tar.xz |
time-created | 2024-11-13 03:34:24 |
time-finished | 2024-11-13 03:38:18 |
title | Fixed findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |