vulkan-loader-1.4.321.0-4.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:133:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen("gen_defines.asm", "w")’ where non-null expected
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:90:5: enter_function: entry to ‘main’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:101:8: branch_false: following ‘false’ branch (when ‘assembler != 0’)...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:105:22: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:132:18: call_function: inlined call to ‘loader_fopen’ from ‘main’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/asm_offset.c:133:5: danger: argument 2 (‘fopen("gen_defines.asm", "w")’) from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#argument 2 of ‘__builtin_fputc’ must be non-null
#  131|   
#  132|       FILE *file = loader_fopen("gen_defines.asm", "w");
#  133|->     fprintf(file, "\n");
#  134|       if (assembler == MASM) {
#  135|           for (size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:249:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘loader_instance_heap_alloc(instance, 4, 1)’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:180:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:182:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:239:12: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:248:13: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:248:12: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:249:13: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:249:58: danger: dereference of NULL ‘loader_instance_heap_alloc(instance, 4, 1)’
#  247|           }
#  248|           if (inst->debug_utils_messengers_list.list &&
#  249|->             inst->debug_utils_messengers_list.capacity > (*pNextIndex) * sizeof(struct loader_used_object_status)) {
#  250|               inst->debug_utils_messengers_list.list[*pNextIndex].status = VK_FALSE;
#  251|               if (NULL != pAllocator) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:527:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘loader_instance_heap_alloc(instance, 4, 1)’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:458:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:460:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:517:12: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:526:13: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:526:12: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:527:13: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/debug_utils.c:527:58: danger: dereference of NULL ‘loader_instance_heap_alloc(instance, 4, 1)’
#  525|           }
#  526|           if (inst->debug_report_callbacks_list.list &&
#  527|->             inst->debug_report_callbacks_list.capacity > (*pNextIndex) * sizeof(struct loader_used_object_status)) {
#  528|               inst->debug_report_callbacks_list.list[*pNextIndex].status = VK_FALSE;
#  529|               if (NULL != pAllocator) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_resource: opened here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  106|       }
#  107|       if (-1 == fstat(fileno(file), &stats)) {
#  108|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read file size of JSON file %s", filename);
#  109|           res = VK_ERROR_INITIALIZATION_FAILED;
#  110|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_memory: allocated here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:108:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  106|       }
#  107|       if (-1 == fstat(fileno(file), &stats)) {
#  108|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read file size of JSON file %s", filename);
#  109|           res = VK_ERROR_INITIALIZATION_FAILED;
#  110|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_resource: opened here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:25: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  110|           goto out;
#  111|       }
#  112|->     *out_buff = (char *)loader_instance_heap_calloc(inst, stats.st_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
#  113|       if (NULL == *out_buff) {
#  114|           loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to allocate memory to read JSON file %s", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_memory: allocated here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:25: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  110|           goto out;
#  111|       }
#  112|->     *out_buff = (char *)loader_instance_heap_calloc(inst, stats.st_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
#  113|       if (NULL == *out_buff) {
#  114|           loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to allocate memory to read JSON file %s", filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_resource: opened here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:113:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  112|       *out_buff = (char *)loader_instance_heap_calloc(inst, stats.st_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
#  113|       if (NULL == *out_buff) {
#  114|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to allocate memory to read JSON file %s", filename);
#  115|           res = VK_ERROR_OUT_OF_HOST_MEMORY;
#  116|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_memory: allocated here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:113:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:114:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  112|       *out_buff = (char *)loader_instance_heap_calloc(inst, stats.st_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
#  113|       if (NULL == *out_buff) {
#  114|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to allocate memory to read JSON file %s", filename);
#  115|           res = VK_ERROR_OUT_OF_HOST_MEMORY;
#  116|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_resource: opened here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:113:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:118:9: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:118:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  117|       }
#  118|       if (stats.st_size != (long int)fread(*out_buff, sizeof(char), stats.st_size, file)) {
#  119|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read entire JSON file %s", filename);
#  120|           res = VK_ERROR_INITIALIZATION_FAILED;
#  121|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:101:12: acquire_memory: allocated here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:102:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:15: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:107:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:112:59: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:113:8: branch_false: following ‘false’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:118:9: branch_false: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:118:8: branch_true: following ‘true’ branch...
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: branch_true: ...to here
Vulkan-Loader-vulkan-sdk-1.4.321.0/loader/loader_json.c:119:9: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  117|       }
#  118|       if (stats.st_size != (long int)fread(*out_buff, sizeof(char), stats.st_size, file)) {
#  119|->         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read entire JSON file %s", filename);
#  120|           res = VK_ERROR_INITIALIZATION_FAILED;
#  121|           goto out;

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-204.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namevulkan-loader-1.4.321.0-4.fc44
store-results-to/tmp/tmppbhme6rm/vulkan-loader-1.4.321.0-4.fc44.tar.xz
time-created2025-10-28 20:39:09
time-finished2025-10-28 20:41:00
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmppbhme6rm/vulkan-loader-1.4.321.0-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmppbhme6rm/vulkan-loader-1.4.321.0-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9