Task #130578 - added.err
back to task #130578download
Error: GCC_ANALYZER_WARNING (CWE-476):
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):
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";