Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:395:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8' crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:10:39: note: in definition of macro 'YAJL_GET_ARRAY_NO_CHECK' crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array' # 393| for (j = 0; j < ptr->strarrays_item_lens[i]; j++) # 394| { # 395|-> free (ptr->strarrays[i][j]); # 396| ptr->strarrays[i][j] = NULL; # 397| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'make_image_spec_schema_content_descriptor' crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:63:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:63:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'clone_image_spec_schema_defs_map_string_object' crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:178:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'calloc(*src.len + 1, 8)' # 176| for (i = 0; i < src->len; i++) # 177| { # 178|-> ret->values[i] = clone_image_spec_schema_defs_map_string_object_element (src->values[i]); # 179| if (ret->values[i] == NULL) # 180| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'make_image_spec_schema_image_layout_schema' crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: CPPCHECK_WARNING (CWE-401): [#def7] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4527: error[memleak]: Memory leak: ret # 4525| ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices)); # 4526| if (ret->devices == NULL) # 4527|-> return NULL; # 4528| for (size_t i = 0; i < src->devices_len; i++) # 4529| { Error: CPPCHECK_WARNING (CWE-401): [#def8] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1315: error[memleak]: Memory leak: ret # 1313| ret->kernel = clone_runtime_spec_schema_config_vm_kernel (src->kernel); # 1314| if (ret->kernel == NULL) # 1315|-> return NULL; # 1316| } # 1317| if (src->image) Error: CPPCHECK_WARNING (CWE-401): [#def9] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1321: error[memleak]: Memory leak: ret # 1319| ret->image = clone_runtime_spec_schema_config_vm_image (src->image); # 1320| if (ret->image == NULL) # 1321|-> return NULL; # 1322| } # 1323| if (src->hw_config) Error: CPPCHECK_WARNING (CWE-401): [#def10] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1327: error[memleak]: Memory leak: ret # 1325| ret->hw_config = clone_runtime_spec_schema_config_vm_hw_config (src->hw_config); # 1326| if (ret->hw_config == NULL) # 1327|-> return NULL; # 1328| } # 1329| return move_ptr (ret); Error: CPPCHECK_WARNING (CWE-401): [#def11] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1291: error[memleak]: Memory leak: ret # 1289| ret->endpoint_list = calloc (src->endpoint_list_len + 1, sizeof (*ret->endpoint_list)); # 1290| if (ret->endpoint_list == NULL) # 1291|-> return NULL; # 1292| for (size_t i = 0; i < src->endpoint_list_len; i++) # 1293| { Error: CPPCHECK_WARNING (CWE-401): [#def12] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1521: error[memleak]: Memory leak: ret # 1519| ret->utility_vm_path = strdup (src->utility_vm_path); # 1520| if (ret->utility_vm_path == NULL) # 1521|-> return NULL; # 1522| } # 1523| return move_ptr (ret); Error: CPPCHECK_WARNING (CWE-401): [#def13] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1903: error[memleak]: Memory leak: ret # 1901| ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders)); # 1902| if (ret->layer_folders == NULL) # 1903|-> return NULL; # 1904| for (size_t i = 0; i < src->layer_folders_len; i++) # 1905| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_syscall_arg' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:241:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:315:25: note: in expansion of macro 'YAJL_GET_STRING' # 239| if (tree == NULL) # 240| return NULL; # 241|-> ret = calloc (1, sizeof (*ret)); # 242| if (ret == NULL) # 243| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_network_interface_priority' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2273:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2294:19: note: in expansion of macro 'YAJL_IS_NUMBER' # 2271| if (tree == NULL) # 2272| return NULL; # 2273|-> ret = calloc (1, sizeof (*ret)); # 2274| if (ret == NULL) # 2275| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_namespace_reference' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: note: in expansion of macro 'YAJL_GET_STRING' # 2631| if (tree == NULL) # 2632| return NULL; # 2633|-> ret = calloc (1, sizeof (*ret)); # 2634| if (ret == NULL) # 2635| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: note: in expansion of macro 'YAJL_GET_STRING' # 2631| if (tree == NULL) # 2632| return NULL; # 2633|-> ret = calloc (1, sizeof (*ret)); # 2634| if (ret == NULL) # 2635| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'make_runtime_spec_schema_defs_windows_device' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'make_runtime_spec_schema_defs_zos_namespace_reference' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 19| if (tree == NULL) # 20| return NULL; # 21|-> ret = calloc (1, sizeof (*ret)); # 22| if (ret == NULL) # 23| return NULL; Error: CPPCHECK_WARNING (CWE-401): [#def22] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1431: error[memleak]: Memory leak: ret # 1429| { # 1430| yajl_tree_free (resi); # 1431|-> return NULL; # 1432| } # 1433| } Error: CPPCHECK_WARNING (CWE-401): [#def23] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1516: error[memleak]: Memory leak: ret # 1514| ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap); # 1515| if (ret->idmap == NULL) # 1516|-> return NULL; # 1517| } # 1518| return move_ptr (ret); Error: CPPCHECK_WARNING (CWE-401): [#def24] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:2025: error[memleak]: Memory leak: ret # 2023| ret->namespaces = calloc (src->namespaces_len + 1, sizeof (*ret->namespaces)); # 2024| if (ret->namespaces == NULL) # 2025|-> return NULL; # 2026| for (size_t i = 0; i < src->namespaces_len; i++) # 2027| { Error: GCC_ANALYZER_WARNING (CWE-457): [#def25] crun-HEAD/src/libcrun/error.c: scope_hint: In function 'make_json_error' crun-HEAD/src/libcrun/error.c:416:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'level' # 414| # 415| yajl_gen_string (gen, YAJL_STR ("level"), strlen ("level")); # 416|-> yajl_gen_string (gen, YAJL_STR (level), strlen (level)); # 417| # 418| yajl_gen_string (gen, YAJL_STR ("time"), strlen ("time")); Error: GCC_ANALYZER_WARNING (CWE-688): [#def26] crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'join_namespaces' crun-HEAD/src/libcrun/linux.c:4148:17: warning[-Wanalyzer-null-argument]: use of NULL 'cwd' where non-null expected /usr/include/unistd.h:517:12: note: argument 1 of 'chdir' must be non-null # 4146| if (value == CLONE_NEWNS) # 4147| { # 4148|-> ret = chdir (cwd); # 4149| if (UNLIKELY (ret < 0)) # 4150| return crun_make_error (err, errno, "chdir `%s`", cwd); Error: GCC_ANALYZER_WARNING (CWE-1341): [#def27] crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_join_process' crun-HEAD/src/libcrun/linux.c:5854:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[0]' # 5852| exit: # 5853| if (sync_socket_fd[0] >= 0) # 5854|-> TEMP_FAILURE_RETRY (close (sync_socket_fd[0])); # 5855| if (sync_socket_fd[1] >= 0) # 5856| TEMP_FAILURE_RETRY (close (sync_socket_fd[1])); Error: GCC_ANALYZER_WARNING (CWE-1341): [#def28] crun-HEAD/src/libcrun/linux.c:5856:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[1]' # 5854| TEMP_FAILURE_RETRY (close (sync_socket_fd[0])); # 5855| if (sync_socket_fd[1] >= 0) # 5856|-> TEMP_FAILURE_RETRY (close (sync_socket_fd[1])); # 5857| return ret; # 5858| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts' crun-HEAD/src/libcrun/linux.c:6485:1: warning[-Wanalyzer-malloc-leak]: leak of 'data' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts' # 6483| # 6484| return run_in_container_namespace (status, do_mount_in_a_container, &args, err); # 6485|-> } # 6486| # 6487| int Error: GCC_ANALYZER_WARNING (CWE-1341): [#def30] crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'client_fd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c:4093:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 106| int *pp = (int *) p; # 107| if (*pp >= 0) # 108|-> TEMP_FAILURE_RETRY (close (*pp)); # 109| } # 110| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def31] crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dest_fd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 106| int *pp = (int *) p; # 107| if (*pp >= 0) # 108|-> TEMP_FAILURE_RETRY (close (*pp)); # 109| } # 110| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def32] crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'gid_fd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 106| int *pp = (int *) p; # 107| if (*pp >= 0) # 108|-> TEMP_FAILURE_RETRY (close (*pp)); # 109| } # 110| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def33] crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'map_fd' /usr/include/features.h:540: included_from: Included from here. /usr/include/bits/libc-header-start.h:33: included_from: Included from here. /usr/include/stdio.h:28: included_from: Included from here. crun-HEAD/src/libcrun/linux.h:21: included_from: Included from here. crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c:370:20: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 106| int *pp = (int *) p; # 107| if (*pp >= 0) # 108|-> TEMP_FAILURE_RETRY (close (*pp)); # 109| } # 110| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def34] crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'uid_fd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0' crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 106| int *pp = (int *) p; # 107| if (*pp >= 0) # 108|-> TEMP_FAILURE_RETRY (close (*pp)); # 109| } # 110| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def35] crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '**cgroup_dirfd.dirfd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' # 211| if (*fd >= 0) # 212| { # 213|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 214| if (LIKELY (ret == 0)) # 215| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): [#def36] crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'gid_fd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c:449:16: note: in expansion of macro 'crun_make_error' # 211| if (*fd >= 0) # 212| { # 213|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 214| if (LIKELY (ret == 0)) # 215| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): [#def37] crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'targetfd' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c:4093:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0' # 211| if (*fd >= 0) # 212| { # 213|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 214| if (LIKELY (ret == 0)) # 215| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-457): [#def38] crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'xstrdup' crun-HEAD/src/libcrun/utils.h:227:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*str' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup' crun-HEAD/src/libcrun/linux.c:3863:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup' crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup' crun-HEAD/libocispec/src/ocispec/json_common.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here. crun-HEAD/src/libcrun/linux.h:27: included_from: Included from here. /usr/include/string.h:202:14: note: argument 1 of 'strdup' must be a pointer to a null-terminated string # 225| return NULL; # 226| # 227|-> ret = strdup (str); # 228| if (ret == NULL) # 229| OOM ();
| analyzer-version-clippy | 1.94.1 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.94.1 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.0.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.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-251.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.20260320.200800.gd35503f.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | crun-1.27-1.20260415145200241464.pr2068.7.g76b886b3 |
| diffbase-store-results-to | /tmp/tmps3home9i/crun-1.27-1.20260415145200241464.pr2068.7.g76b886b3.tar.xz |
| diffbase-time-created | 2026-04-15 15:05:29 |
| diffbase-time-finished | 2026-04-15 15:08:16 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmps3home9i/crun-1.27-1.20260415145200241464.pr2068.7.g76b886b3.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmps3home9i/crun-1.27-1.20260415145200241464.pr2068.7.g76b886b3.src.rpm' |
| diffbase-tool-version | csmock-3.8.5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-251.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.20260320.200800.gd35503f.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | crun-1.27-1.20260402151752063764.main.6.g0097db1d |
| store-results-to | /tmp/tmp0e81xxui/crun-1.27-1.20260402151752063764.main.6.g0097db1d.tar.xz |
| time-created | 2026-04-15 15:01:18 |
| time-finished | 2026-04-15 15:05:13 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp0e81xxui/crun-1.27-1.20260402151752063764.main.6.g0097db1d.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp0e81xxui/crun-1.27-1.20260402151752063764.main.6.g0097db1d.src.rpm' |
| tool-version | csmock-3.8.5-1.el9 |