Skip to content

New warnings in probes with newer clang #285

@haesbaert

Description

@haesbaert
In file included from bpf_probes.c:12:
In file included from elastic-ebpf/GPL/Events/Process/Probe.bpf.c:17:
elastic-ebpf/GPL/Events/Helpers.h:208:23: warning: default initialization of an object of type 'typeof ((tty)->index)' (aka 'const int') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
  208 |     tty_dev->minor += BPF_CORE_READ(tty, index);
      |                       ^
include/bpf/bpf_core_read.h:520:35: note: expanded from macro 'BPF_CORE_READ'
  520 |         ___type((src), a, ##__VA_ARGS__) __r;                               \
      |                                          ^
...
...

This is due: libbpf/libbpf@d88ca95

We can't simply update our libbpf sub-module as it won't build under the ancient centos7 libc, we can patch it, but then we enter a dark path, consider disabling the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions