Task #52315 - added.err
back to task #52315download
Error: GCC_ANALYZER_WARNING (CWE-476):
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘((virDomainIothreadMappingDef)*(void *)((void *)ioth)).queues’
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2834:8: branch_false: following ‘false’ branch (when ‘iothreads’ is non-NULL)...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2837:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2839:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2858:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2858:25: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2859:38: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2863:12: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2869:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2871:12: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2878:13: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2878:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2884:21: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: danger: dereference of NULL ‘*ioth.queues + i * 4’
# 2885| bool hasMapping;
# 2886|
# 2887|-> if (virBitmapGetBit(queueMap, ioth->queues[i], &hasMapping) < 0) {
# 2888| virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
# 2889| _("iothread queue '%1$u' mapping out of range"),
Error: GCC_ANALYZER_WARNING (CWE-476):
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘((virDomainIothreadMappingDef)*(void *)*n.data).queues’
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3659:1: enter_function: entry to ‘qemuValidateCheckSCSIControllerIOThreads’
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3666:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3674:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3674:8: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3675:14: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3675:12: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3682:47: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3681:13: call_function: calling ‘qemuDomainValidateIothreadMapping’ from ‘qemuValidateCheckSCSIControllerIOThreads’
# 2885| bool hasMapping;
# 2886|
# 2887|-> if (virBitmapGetBit(queueMap, ioth->queues[i], &hasMapping) < 0) {
# 2888| virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
# 2889| _("iothread queue '%1$u' mapping out of range"),
Error: GCC_ANALYZER_WARNING (CWE-476):
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3392:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3356:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3359:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3361:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3365:8: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3365:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3369:8: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3369:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3371:15: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3373:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3379:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3379:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3385:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3388:17: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3390:43: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3390:43: release_memory: ‘0’ is NULL
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3392:43: danger: dereference of NULL ‘params + i * 88’
# 3390| ret->params.params_val[i].field = g_strdup(params[i].field);
# 3391|
# 3392|-> ret->params.params_val[i].value = params[i].value;
# 3393| }
# 3394|
Error: GCC_ANALYZER_WARNING (CWE-476):
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3458:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3422:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3425:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3427:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3431:8: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3431:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3435:8: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3435:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3437:15: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3439:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3445:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3445:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3451:5: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3454:17: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3456:43: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3456:43: release_memory: ‘0’ is NULL
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3458:43: danger: dereference of NULL ‘params + i * 88’
# 3456| ret->params.params_val[i].field = g_strdup(params[i].field);
# 3457|
# 3458|-> ret->params.params_val[i].value = params[i].value;
# 3459| }
# 3460|
Error: GCC_ANALYZER_WARNING (CWE-476):
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5222:1: enter_function: entry to ‘remoteDispatchDomainGetCPUStats’
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5235:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5238:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5238:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5242:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5242:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5247:8: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5247:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5250:17: call_function: inlined call to ‘get_nonnull_domain’ from ‘remoteDispatchDomainGetCPUStats’
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5250:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5255:39: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5256:8: branch_false: following ‘false’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5259:9: branch_false: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5272:8: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5275:21: branch_true: following ‘true’ branch...
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:23: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:23: release_memory: ‘0’ is NULL
libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:17: danger: dereference of NULL ‘params + i * 96’
# 5274|
# 5275| for (i = 0; i < percpu_len; i++) {
# 5276|-> if (params[i].type == VIR_TYPED_PARAM_STRING)
# 5277| ret->nparams--;
# 5278| }
Error: GCC_ANALYZER_WARNING (CWE-688):
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:73:5: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ where non-null expected
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_memory: allocated here
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:8: release_memory: assuming ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ is NULL
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:8: branch_true: following ‘true’ branch...
<unknown>: branch_true: ...to here
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:348:34: call_function: inlined call to ‘cleanupFile’ from ‘main’
# 71| {
# 72| FILE *file = *ptr;
# 73|-> fclose(file);
# 74| }
# 75|
Error: GCC_ANALYZER_WARNING (CWE-775):
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_resource: opened here
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: danger: ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 348| cleanup(FILE *, cleanupFile) log = NULL;
# 349|
# 350|-> if (!(log = fopen(abs_builddir "/commandhelper.log", "w")))
# 351| return EXIT_FAILURE;
# 352|
Error: GCC_ANALYZER_WARNING (CWE-401):
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_memory: allocated here
libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: danger: ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 348| cleanup(FILE *, cleanupFile) log = NULL;
# 349|
# 350|-> if (!(log = fopen(abs_builddir "/commandhelper.log", "w")))
# 351| return EXIT_FAILURE;
# 352|
Error: GCC_ANALYZER_WARNING (CWE-775):
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: acquire_resource: opened here
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: danger: ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 105| testname);
# 106|
# 107|-> if (!(fp = fopen(path, "r")))
# 108| return -1;
# 109|
Error: GCC_ANALYZER_WARNING (CWE-401):
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: acquire_memory: allocated here
libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: danger: ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 105| testname);
# 106|
# 107|-> if (!(fp = fopen(path, "r")))
# 108| return -1;
# 109|
Error: GCC_ANALYZER_WARNING (CWE-775):
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: acquire_resource: opened here
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: danger: ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 191| abs_srcdir, arch, data->testName);
# 192|
# 193|-> if (!(f = fopen(cpuinfo, "r"))) {
# 194| virReportSystemError(errno,
# 195| "Failed to open cpuinfo file '%s'", cpuinfo);
Error: GCC_ANALYZER_WARNING (CWE-401):
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: acquire_memory: allocated here
libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: danger: ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 191| abs_srcdir, arch, data->testName);
# 192|
# 193|-> if (!(f = fopen(cpuinfo, "r"))) {
# 194| virReportSystemError(errno,
# 195| "Failed to open cpuinfo file '%s'", cpuinfo);