Task #742 - added.err
back to task #742download
Error: GCC_ANALYZER_WARNING (CWE-476):
libbpf-1.4.3-build/libbpf-1.4.3/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.3-build/libbpf-1.4.3/src/btf.c:1500:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘btf’
libbpf-1.4.3-build/libbpf-1.4.3/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.3-build/libbpf-1.4.3/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.3-build/libbpf-1.4.3/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
# 1498| const char *btf__str_by_offset(const struct btf *btf, __u32 offset)
# 1499| {
# 1500|-> if (offset < btf->start_str_off)
# 1501| return btf__str_by_offset(btf->base_btf, offset);
# 1502| else if (offset - btf->start_str_off < btf->hdr->str_len)
Error: CPPCHECK_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/elf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/elf.c:57:2: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 55| if (!elf_fd)
# 56| return;
# 57|-> elf_end(elf_fd->elf);
# 58| close(elf_fd->fd);
# 59| }
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/elf.c:383:8: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 381| if (ret)
# 382| return ret;
# 383|-> ret = elf_find_func_offset(elf_fd.elf, binary_path, name);
# 384| elf_close(&elf_fd);
# 385| return ret;
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/elf.c:440:9: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
# 438| struct elf_sym *sym;
# 439|
# 440|-> err = elf_sym_iter_new(&iter, elf_fd.elf, binary_path, sh_types[i], st_type);
# 441| if (err == -ENOENT)
# 442| continue;
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/elf.c:521:9: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
# 519| struct elf_sym *sym;
# 520|
# 521|-> err = elf_sym_iter_new(&iter, elf_fd.elf, binary_path, sh_types[i], STT_FUNC);
# 522| if (err == -ENOENT)
# 523| continue;
Error: CPPCHECK_WARNING (CWE-457):
libbpf-1.4.3-build/libbpf-1.4.3/src/features.c:325: error[uninitvar]: Uninitialized variable: name
# 323|
# 324| memset(&info, 0, sizeof(info));
# 325|-> info.name = ptr_to_u64(name);
# 326| info.name_len = sizeof(name);
# 327|
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:871:4: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 869| */
# 870| if (new_free_ids || new_cnt == 0) {
# 871|-> memcpy(new_free_ids + man->free_spec_cnt, usdt_link->spec_ids,
# 872| usdt_link->spec_cnt * sizeof(*usdt_link->spec_ids));
# 873| man->free_spec_ids = new_free_ids;
Error: GCC_ANALYZER_WARNING (CWE-401):
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c: scope_hint: In function ‘bpf_link_usdt_detach’
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:874:44: warning[-Wanalyzer-malloc-leak]: leak of ‘*man.free_spec_ids’
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c: scope_hint: In function ‘bpf_link_usdt_detach’
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
# 872| usdt_link->spec_cnt * sizeof(*usdt_link->spec_ids));
# 873| man->free_spec_ids = new_free_ids;
# 874|-> man->free_spec_cnt = new_cnt;
# 875| }
# 876| }
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:1069:15: warning[core.NullDereference]: Array access (from variable 'offsets') results in a null pointer dereference
# 1067|
# 1068| if (man->has_uprobe_multi) {
# 1069|-> offsets[i] = target->rel_ip;
# 1070| ref_ctr_offsets[i] = target->sema_off;
# 1071| cookies[i] = spec_id;
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:1112:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'cookies'
# 1110| }
# 1111|
# 1112|-> free(targets);
# 1113| hashmap__free(specs_hash);
# 1114| elf_close(&elf_fd);
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:1112:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'offsets'
# 1110| }
# 1111|
# 1112|-> free(targets);
# 1113| hashmap__free(specs_hash);
# 1114| elf_close(&elf_fd);
Error: CLANG_WARNING:
libbpf-1.4.3-build/libbpf-1.4.3/src/usdt.c:1112:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'ref_ctr_offsets'
# 1110| }
# 1111|
# 1112|-> free(targets);
# 1113| hashmap__free(specs_hash);
# 1114| elf_close(&elf_fd);