Task #62176 - added.err
back to task #62176download
Error: GCC_ANALYZER_WARNING (CWE-688):
crun-HEAD/src/libcrun/cgroup-resources.c:153:12: warning[-Wanalyzer-null-argument]: use of NULL 'controllers' where non-null expected
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 151| key = xstrdup (name);
# 152|
# 153|-> it = strchr (key, '.');
# 154| if (it == NULL)
# 155| {
Error: GCC_ANALYZER_WARNING (CWE-688):
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'bpfprog_path_from_scope'
crun-HEAD/src/libcrun/cgroup-systemd.c:1389:16: warning[-Wanalyzer-null-argument]: use of NULL 'it' where non-null expected
crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-systemd.c:23: included_from: Included from here.
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 1387| /* Remove dots as EBPF code don't like them. */
# 1388| it = flat_scope;
# 1389|-> while ((it = strchr (it, '.')) != NULL)
# 1390| *it = '_';
# 1391|
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_read_program'
crun-HEAD/src/libcrun/ebpf.c:103:41: warning[-Wanalyzer-malloc-leak]: leak of 'bpf_program_new(buffer_size)'
# 101| bpf_program_new (size_t size)
# 102| {
# 103|-> struct bpf_program *p = xmalloc (size + sizeof (struct bpf_program));
# 104|
# 105| p->used = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/ebpf.c:115:8: warning[-Wanalyzer-malloc-leak]: leak of 'bpf_program_append(bpf_program_new(buffer_size), xmalloc(buffer_size), buffer_size)'
# 113| bpf_program_append (struct bpf_program *p, void *data, size_t size)
# 114| {
# 115|-> if (p->allocated <= p->used + size)
# 116| {
# 117| p->allocated += size * 2;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/ebpf.c:23: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_ebpf_read_program'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(buffer_size)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 63| {
# 64| void *res = malloc (size);
# 65|-> if (UNLIKELY (res == NULL))
# 66| OOM ();
# 67| return res;
Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '<unknown>'
crun-HEAD/src/libcrun/ebpf.h:25: included_from: Included from here.
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|