Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources_cpu' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:212:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu_affinity(get_val(tree, "affinity", 3), ctx, err)' # 210| while (0); # 211| # 212|-> if (tree->type == yajl_t_object) # 213| { # 214| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:414:34: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx, err)' # 412| while (0); # 413| ret->affinity = make_runtime_spec_schema_config_windows_resources_cpu_affinity (get_val (tree, "affinity", yajl_t_object), ctx, err); # 414|-> if (ret->affinity == NULL && *err != 0) # 415| return NULL; # 416| Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:417:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 415| return NULL; # 416| # 417|-> if (tree->type == yajl_t_object) # 418| { # 419| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'clone_runtime_spec_schema_config_windows_resources' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:561:21: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_windows_resources_cpu(*src.cpu)' # 559| if (ret == NULL) # 560| return NULL; # 561|-> ret->count = src->count; # 562| ret->count_present = src->count_present; # 563| ret->shares = src->shares; Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:570:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 568| { # 569| ret->affinity = clone_runtime_spec_schema_config_windows_resources_cpu_affinity (src->affinity); # 570|-> if (ret->affinity == NULL) # 571| return NULL; # 572| } Error: CPPCHECK_WARNING (CWE-401): [#def6] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1913: error[memleak]: Memory leak: ret # 1911| ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders)); # 1912| if (ret->layer_folders == NULL) # 1913|-> return NULL; # 1914| for (size_t i = 0; i < src->layer_folders_len; i++) # 1915| { Error: CPPCHECK_WARNING (CWE-401): [#def7] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2808: error[memleak]: Memory leak: ret # 2806| ret->path = strdup (src->path); # 2807| if (ret->path == NULL) # 2808|-> return NULL; # 2809| } # 2810| return move_ptr (ret); Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] 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:102:12: 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_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' # 100| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 101| # 102|-> if (ctx->options & OPT_PARSE_FULLKEY) # 103| ret->_residual = resi; # 104| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:455:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' # 453| while (0); # 454| # 455|-> if (tree->type == yajl_t_object) # 456| { # 457| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:455:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' # 453| while (0); # 454| # 455|-> if (tree->type == yajl_t_object) # 456| { # 457| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx, err)' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' # 149| /* Various convenience macros to check the type of a `yajl_val` */ # 150| #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string)) # 151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number)) # 152| #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID)) # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' # 154| #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object)) # 155| #define YAJL_IS_ARRAY(v) (((v) != NULL) && ((v)->type == yajl_t_array )) # 156|-> #define YAJL_IS_TRUE(v) (((v) != NULL) && ((v)->type == yajl_t_true )) # 157| #define YAJL_IS_FALSE(v) (((v) != NULL) && ((v)->type == yajl_t_false )) # 158| #define YAJL_IS_NULL(v) (((v) != NULL) && ((v)->type == yajl_t_null )) Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update' crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(184)' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' crun-HEAD/src/libcrun/container.c:582:7: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/container.c:1626:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' # 72| { # 73| void *res = calloc (1, size); # 74|-> if (UNLIKELY (res == NULL)) # 75| OOM (); # 76| return res;
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.1.1 |
analyzer-version-gcc-analyzer | 15.1.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.1.1 |
diffbase-analyzer-version-gcc-analyzer | 15.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.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-64.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.20250509.165649.g41c6174.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | crun-1.21-1.20250512094810910083.main.93.g819c2a76 |
diffbase-store-results-to | /tmp/tmpa98q2twb/crun-1.21-1.20250512094810910083.main.93.g819c2a76.tar.xz |
diffbase-time-created | 2025-05-13 08:19:57 |
diffbase-time-finished | 2025-05-13 08:25:18 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpa98q2twb/crun-1.21-1.20250512094810910083.main.93.g819c2a76.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpa98q2twb/crun-1.21-1.20250512094810910083.main.93.g819c2a76.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-64.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.20250509.165649.g41c6174.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | crun-1.21-1.20250513081132445027.pr1748.95.ge8a4d2b2 |
store-results-to | /tmp/tmpt_pgeqq3/crun-1.21-1.20250513081132445027.pr1748.95.ge8a4d2b2.tar.xz |
time-created | 2025-05-13 08:25:47 |
time-finished | 2025-05-13 08:31:33 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpt_pgeqq3/crun-1.21-1.20250513081132445027.pr1748.95.ge8a4d2b2.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpt_pgeqq3/crun-1.21-1.20250513081132445027.pr1748.95.ge8a4d2b2.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |