Task #68706 - added.err
back to task #68706download
Error: GCC_ANALYZER_WARNING (CWE-688):
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_cgroup_scope_path'
crun-HEAD/src/libcrun/cgroup-systemd.c:2072:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 2070| path_to_scope = xstrdup (cgroup_path);
# 2071|
# 2072|-> cur = strchr (path_to_scope, '/');
# 2073| while (cur)
# 2074| {
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'libcrun_destroy_cgroup_systemd'
crun-HEAD/src/libcrun/cgroup-systemd.c:2073:10: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)'
# 2071|
# 2072| cur = strchr (path_to_scope, '/');
# 2073|-> while (cur)
# 2074| {
# 2075| char *next = strchr (cur + 1, '/');
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/cgroup-systemd.c:2075:32: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)'
# 2073| while (cur)
# 2074| {
# 2075|-> char *next = strchr (cur + 1, '/');
# 2076| if (next == NULL)
# 2077| break;
Error: COMPILER_WARNING (CWE-563):
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_query_cgroup_progs'
crun-HEAD/src/libcrun/ebpf.c:620:7: warning[-Wunused-variable]: unused variable 'ret'
# 620 | int ret;
# | ^~~
# 618| #else
# 619| cleanup_close int cgroup_fd = -1;
# 620|-> int ret;
# 621|
# 622| cgroup_fd = open (cgroup_path, O_RDONLY | O_CLOEXEC);
Error: GCC_ANALYZER_WARNING (CWE-775):
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_query_cgroup_progs'
crun-HEAD/src/libcrun/ebpf.c:622:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(cgroup_path, 524288)'
# 620| int ret;
# 621|
# 622|-> cgroup_fd = open (cgroup_path, O_RDONLY | O_CLOEXEC);
# 623| if (UNLIKELY (cgroup_fd < 0))
# 624| return crun_make_error (err, errno, "open cgroup path `%s`", cgroup_path);
Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cgroup_fd'
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|