Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:179:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*platform_id.device’ OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:171:8: branch_false: following ‘false’ branch... OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:176:8: branch_false: ...to here OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:176:8: branch_true: following ‘true’ branch (when ‘devices’ is non-NULL)... OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:177:14: branch_true: ...to here OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:177:12: branch_true: following ‘true’ branch... OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:178:50: branch_true: ...to here OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:178:50: acquire_memory: this call could return NULL OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:179:13: danger: ‘malloc(8)’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) # 177| if (!platform_id->device) { # 178| platform_id->device = (cl_device_id) malloc(sizeof(struct _cl_device_id)); # 179|-> CL_INIT_OBJECT(platform_id->device, stub_platform); # 180| } # 181| devices[0] = platform_id->device; Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:1979:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘stub_platform’ OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:1974:8: branch_true: following ‘true’ branch... OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:1975:18: branch_true: ...to here OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:1976:42: acquire_memory: this call could return NULL OpenCL-ICD-Loader-b7bd2803acc779c03d96588e9ca9e9568a18698a/test/driver_stub/cl.c:1979:9: danger: ‘malloc(64)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2) # 1977| memset(stub_platform, 0, sizeof(struct _cl_platform_id)); # 1978| # 1979|-> CL_INIT_PLATFORM(stub_platform, dispatchTable); # 1980| stub_platform->version = "OpenCL 1.2 Stub"; # 1981| stub_platform->vendor = "stubvendorxxx";
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.97.1 |
| diffbase-analyzer-version-cppcheck | 2.21.1 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.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-96.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | OpenCL-ICD-Loader-3.0.6-7.20250722gitad770a1.fc44 |
| diffbase-store-results-to | /tmp/tmpmmtemf9t/OpenCL-ICD-Loader-3.0.6-7.20250722gitad770a1.fc44.tar.xz |
| diffbase-time-created | 2026-08-03 13:06:22 |
| diffbase-time-finished | 2026-08-03 13:08:19 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpmmtemf9t/OpenCL-ICD-Loader-3.0.6-7.20250722gitad770a1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpmmtemf9t/OpenCL-ICD-Loader-3.0.6-7.20250722gitad770a1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.HEAD-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-96.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | OpenCL-ICD-Loader-3.1-1.20260519gitb7bd280.fc45 |
| store-results-to | /tmp/tmp6hh27wxy/OpenCL-ICD-Loader-3.1-1.20260519gitb7bd280.fc45.tar.xz |
| time-created | 2026-08-03 13:08:25 |
| time-finished | 2026-08-03 13:09:33 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp6hh27wxy/OpenCL-ICD-Loader-3.1-1.20260519gitb7bd280.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp6hh27wxy/OpenCL-ICD-Loader-3.1-1.20260519gitb7bd280.fc45.src.rpm' |
| tool-version | csmock-3.8.7.HEAD-1.el9 |