Task #92191 - added.err
back to task #92191download
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/db/namei.c:97:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
xfsprogs-6.17.0/db/namei.c:1116:1: enter_function: entry to ‘link_f’
xfsprogs-6.17.0/db/namei.c:1127:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
xfsprogs-6.17.0/db/namei.c:1128:17: branch_true: ...to here
xfsprogs-6.17.0/db/namei.c:1143:33: call_function: calling ‘path_walk’ from ‘link_f’
# 95| int error;
# 96|
# 97|-> tp = libxfs_trans_alloc_empty(mp);
# 98|
# 99| error = -libxfs_iget(mp, tp, ino, 0, &dp);
Error: GCC_ANALYZER_WARNING (CWE-775):
xfsprogs-6.17.0/db/rdump.c:520:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘destdir.fd’
xfsprogs-6.17.0/db/rdump.c:938:1: enter_function: entry to ‘rdump_f’
xfsprogs-6.17.0/db/rdump.c:960:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:967:28: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:975:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:982:26: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:986:22: acquire_resource: opened here
xfsprogs-6.17.0/db/rdump.c:987:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:993:23: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:993:12: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/db/rdump.c:995:17: branch_true: ...to here
xfsprogs-6.17.0/db/rdump.c:996:23: call_function: calling ‘rdump_path’ from ‘rdump_f’
# 518| cd = calloc(1, sizeof(struct copydirent));
# 519| if (!cd) {
# 520|-> dbprintf(_("%s%s%s: %s\n"), destdir->path, destdir->sep,
# 521| pbuf->path, strerror(errno));
# 522| return 1;
Error: GCC_ANALYZER_WARNING (CWE-775):
xfsprogs-6.17.0/db/rdump.c:846:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘destdir.fd’
xfsprogs-6.17.0/db/rdump.c:938:1: enter_function: entry to ‘rdump_f’
xfsprogs-6.17.0/db/rdump.c:960:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:967:28: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:975:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:982:26: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:986:22: acquire_resource: opened here
xfsprogs-6.17.0/db/rdump.c:987:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:993:23: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:993:12: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/db/rdump.c:995:17: branch_true: ...to here
xfsprogs-6.17.0/db/rdump.c:996:23: call_function: calling ‘rdump_path’ from ‘rdump_f’
# 844| ret = -libxfs_iget(mp, tp, ino, 0, &ip);
# 845| if (ret) {
# 846|-> dbprintf(_("%s: %s\n"), pbuf->path, strerror(ret));
# 847| return strict_errors ? ret : 0;
# 848| }
Error: GCC_ANALYZER_WARNING (CWE-775):
xfsprogs-6.17.0/db/rdump.c:929:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘destdir.fd’
xfsprogs-6.17.0/db/rdump.c:938:1: enter_function: entry to ‘rdump_f’
xfsprogs-6.17.0/db/rdump.c:960:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:967:28: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:975:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:982:26: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:986:22: acquire_resource: opened here
xfsprogs-6.17.0/db/rdump.c:987:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:993:23: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:993:12: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/db/rdump.c:995:17: branch_true: ...to here
xfsprogs-6.17.0/db/rdump.c:996:23: call_function: calling ‘rdump_path’ from ‘rdump_f’
# 927| }
# 928|
# 929|-> tp = libxfs_trans_alloc_empty(mp);
# 930|
# 931| ret = rdump_file(tp, iocur_top->ino, destdir, pbuf);
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/db/rdump.c:929:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pbuf’
xfsprogs-6.17.0/db/rdump.c:884:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/db/rdump.c:889:16: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:889:16: acquire_memory: allocated here
xfsprogs-6.17.0/db/rdump.c:890:12: branch_false: following ‘false’ branch (when ‘pbuf’ is non-NULL)...
xfsprogs-6.17.0/db/rdump.c:894:20: branch_false: ...to here
xfsprogs-6.17.0/db/rdump.c:929:14: throw: if ‘libxfs_trans_alloc_empty’ throws an exception...
xfsprogs-6.17.0/db/rdump.c:929:14: danger: ‘pbuf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
# 927| }
# 928|
# 929|-> tp = libxfs_trans_alloc_empty(mp);
# 930|
# 931| ret = rdump_file(tp, iocur_top->ino, destdir, pbuf);
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/logprint/log_redo.c:999:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
xfsprogs-6.17.0/logprint/log_redo.c:942:1: enter_function: entry to ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:966:50: acquire_memory: allocated here
xfsprogs-6.17.0/logprint/log_redo.c:966:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
xfsprogs-6.17.0/logprint/log_redo.c:971:13: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:971:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/logprint/log_redo.c:974:13: call_function: inlined call to ‘xfs_attr_log_item_op’ from ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:996:12: branch_true: following ‘true’ branch (when ‘name_len != 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:998:24: branch_true: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:999:17: throw: if ‘print_or_dump’ throws an exception...
xfsprogs-6.17.0/logprint/log_redo.c:999:17: danger: ‘f’ leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
# 997| region++;
# 998| printf(_("ATTRI: name len:%u\n"), name_len);
# 999|-> print_or_dump((char *)item->ri_buf[region].iov_base,
# 1000| name_len);
# 1001| name_ptr = item->ri_buf[region].iov_base;
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/logprint/log_redo.c:1007:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
xfsprogs-6.17.0/logprint/log_redo.c:942:1: enter_function: entry to ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:966:50: acquire_memory: allocated here
xfsprogs-6.17.0/logprint/log_redo.c:966:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
xfsprogs-6.17.0/logprint/log_redo.c:971:13: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:971:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/logprint/log_redo.c:974:13: call_function: inlined call to ‘xfs_attr_log_item_op’ from ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:996:12: branch_false: following ‘false’ branch (when ‘name_len == 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_true: following ‘true’ branch (when ‘new_name_len != 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1005:17: branch_true: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1007:17: throw: if ‘print_or_dump’ throws an exception...
xfsprogs-6.17.0/logprint/log_redo.c:1007:17: danger: ‘f’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
# 1005| region++;
# 1006| printf(_("ATTRI: newname len:%u\n"), new_name_len);
# 1007|-> print_or_dump((char *)item->ri_buf[region].iov_base,
# 1008| new_name_len);
# 1009| new_name_ptr = item->ri_buf[region].iov_base;
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/logprint/log_redo.c:1017:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
xfsprogs-6.17.0/logprint/log_redo.c:942:1: enter_function: entry to ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:966:50: acquire_memory: allocated here
xfsprogs-6.17.0/logprint/log_redo.c:966:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
xfsprogs-6.17.0/logprint/log_redo.c:971:13: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:971:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/logprint/log_redo.c:974:13: call_function: inlined call to ‘xfs_attr_log_item_op’ from ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:996:12: branch_false: following ‘false’ branch (when ‘name_len == 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_false: following ‘false’ branch (when ‘new_name_len == 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1012:12: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1012:12: branch_true: following ‘true’ branch (when ‘value_len != 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1013:31: branch_true: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1017:17: throw: if ‘print_or_dump’ throws an exception...
xfsprogs-6.17.0/logprint/log_redo.c:1017:17: danger: ‘f’ leaks here; was allocated at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
# 1015| region++;
# 1016| printf(_("ATTRI: value len:%u\n"), value_len);
# 1017|-> print_or_dump((char *)item->ri_buf[region].iov_base, len);
# 1018| value_ptr = item->ri_buf[region].iov_base;
# 1019| }
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/logprint/log_redo.c:1026:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
xfsprogs-6.17.0/logprint/log_redo.c:942:1: enter_function: entry to ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:966:50: acquire_memory: allocated here
xfsprogs-6.17.0/logprint/log_redo.c:966:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
xfsprogs-6.17.0/logprint/log_redo.c:971:13: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:971:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/logprint/log_redo.c:974:13: call_function: inlined call to ‘xfs_attr_log_item_op’ from ‘xlog_recover_print_attri’
xfsprogs-6.17.0/logprint/log_redo.c:996:12: branch_false: following ‘false’ branch (when ‘name_len == 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1004:12: branch_false: following ‘false’ branch (when ‘new_name_len == 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1012:12: branch_false: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1012:12: branch_true: following ‘true’ branch (when ‘value_len != 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1013:31: branch_true: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1021:12: branch_true: following ‘true’ branch (when ‘new_value_len != 0’)...
xfsprogs-6.17.0/logprint/log_redo.c:1022:31: branch_true: ...to here
xfsprogs-6.17.0/logprint/log_redo.c:1026:17: throw: if ‘print_or_dump’ throws an exception...
xfsprogs-6.17.0/logprint/log_redo.c:1026:17: danger: ‘f’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
# 1024| region++;
# 1025| printf(_("ATTRI: newvalue len:%u\n"), new_value_len);
# 1026|-> print_or_dump((char *)item->ri_buf[region].iov_base, len);
# 1027| new_value_ptr = item->ri_buf[region].iov_base;
# 1028| }
Error: GCC_ANALYZER_WARNING (CWE-457):
xfsprogs-6.17.0/mkfs/proto.c:1487:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ip’
xfsprogs-6.17.0/mkfs/proto.c:1784:1: enter_function: entry to ‘walk_dir’
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1803:16: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1804:28: branch_true: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1808:17: call_function: calling ‘handle_direntry’ from ‘walk_dir’
# 1485| libxfs_trans_ijoin(tp, pip, 0);
# 1486|
# 1487|-> newdirent(mp, tp, pip, &xname, ip, ppargs);
# 1488|
# 1489| libxfs_bumplink(tp, pip);
Error: GCC_ANALYZER_WARNING (CWE-457):
xfsprogs-6.17.0/mkfs/proto.c:1581:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ip’
xfsprogs-6.17.0/mkfs/proto.c:1784:1: enter_function: entry to ‘walk_dir’
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1803:16: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1804:28: branch_true: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1808:17: call_function: calling ‘handle_direntry’ from ‘walk_dir’
# 1579|
# 1580| libxfs_trans_ijoin(tp, pip, 0);
# 1581|-> newdirent(mp, tp, pip, &xname, ip, ppargs);
# 1582|
# 1583| /*
Error: GCC_ANALYZER_WARNING (CWE-775):
xfsprogs-6.17.0/mkfs/proto.c:1653:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_buf, 2228224)’
xfsprogs-6.17.0/mkfs/proto.c:1642:18: acquire_resource: opened here
xfsprogs-6.17.0/mkfs/proto.c:1643:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1653:29: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1653:14: throw: if ‘openat’ throws an exception...
xfsprogs-6.17.0/mkfs/proto.c:1653:29: danger: ‘open(path_buf, 2228224)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1651| * we handle this special case.
# 1652| */
# 1653|-> fd = openat(pathfd, entry->d_name, O_NOFOLLOW | O_PATH);
# 1654| if(fd < 0) {
# 1655| fprintf(stderr, _("%s: cannot open %s: %s\n"), progname,
Error: GCC_ANALYZER_WARNING (CWE-401):
xfsprogs-6.17.0/mkfs/proto.c:1803:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(path_buf)’
xfsprogs-6.17.0/mkfs/proto.c:1798:20: acquire_memory: allocated here
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1798:12: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1803:25: throw: if ‘readdir’ throws an exception...
xfsprogs-6.17.0/mkfs/proto.c:1803:25: danger: ‘opendir(path_buf)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1801| exit(1);
# 1802| }
# 1803|-> while ((entry = readdir(dir)) != NULL) {
# 1804| if (strcmp(entry->d_name, ".") == 0 ||
# 1805| strcmp(entry->d_name, "..") == 0)
Error: GCC_ANALYZER_WARNING (CWE-775):
xfsprogs-6.17.0/mkfs/proto.c:1852:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path_buf, 393216)’
xfsprogs-6.17.0/mkfs/proto.c:1814:1: enter_function: entry to ‘populate_from_dir’
xfsprogs-6.17.0/mkfs/proto.c:1833:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1836:13: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1836:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1841:14: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1841:14: acquire_resource: opened here
xfsprogs-6.17.0/mkfs/proto.c:1842:12: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/mkfs/proto.c:1852:27: branch_false: ...to here
xfsprogs-6.17.0/mkfs/proto.c:1857:14: call_function: calling ‘getres’ from ‘populate_from_dir’
# 1850| */
# 1851| struct cred creds = {
# 1852|-> .cr_uid = file_stat.st_uid,
# 1853| .cr_gid = file_stat.st_gid,
# 1854| };
Error: GCC_ANALYZER_WARNING (CWE-457):
xfsprogs-6.17.0/repair/rt.c:507:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘error’
xfsprogs-6.17.0/repair/rt.c:489:1: enter_function: entry to ‘discover_rtgroup_inodes’
xfsprogs-6.17.0/repair/rt.c:504:23: call_function: calling ‘xfs_rtgroup_next’ from ‘discover_rtgroup_inodes’
xfsprogs-6.17.0/repair/rt.c:504:23: return_function: returning to ‘discover_rtgroup_inodes’ from ‘xfs_rtgroup_next’
xfsprogs-6.17.0/repair/rt.c:504:16: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/repair/rt.c:504:16: branch_true: ...to here
xfsprogs-6.17.0/repair/rt.c:505:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
xfsprogs-6.17.0/repair/rt.c:506:32: branch_true: ...to here
xfsprogs-6.17.0/repair/rt.c:507:37: danger: use of uninitialized value ‘error’ here
# 505| for (i = 0; i < XFS_RTGI_MAX; i++) {
# 506| err2 = mark_rtginode(tp, rtg, i);
# 507|-> if (err2 && !error)
# 508| error = err2;
# 509| }
Error: GCC_ANALYZER_WARNING (CWE-457):
xfsprogs-6.17.0/repair/rt.c:514:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘error’
xfsprogs-6.17.0/repair/rt.c:489:1: enter_function: entry to ‘discover_rtgroup_inodes’
xfsprogs-6.17.0/repair/rt.c:504:23: call_function: calling ‘xfs_rtgroup_next’ from ‘discover_rtgroup_inodes’
xfsprogs-6.17.0/repair/rt.c:504:23: return_function: returning to ‘discover_rtgroup_inodes’ from ‘xfs_rtgroup_next’
xfsprogs-6.17.0/repair/rt.c:504:16: branch_false: following ‘false’ branch...
xfsprogs-6.17.0/repair/rt.c:512:1: branch_false: ...to here
xfsprogs-6.17.0/repair/rt.c:514:12: branch_true: following ‘true’ branch...
xfsprogs-6.17.0/repair/rt.c:514:13: branch_true: ...to here
xfsprogs-6.17.0/repair/rt.c:514:13: danger: use of uninitialized value ‘error’ here
# 512| out_cancel:
# 513| libxfs_trans_cancel(tp);
# 514|-> if (xfs_has_rtgroups(mp) && error) {
# 515| /*
# 516| * Old xfs_repair didn't complain if rtbitmaps didn't load