Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: Fix misaligned pointer accesses in drsnoop
The perf buffer in drsnoop doesn't maintain 8 byte alignment for delta_ns, nr_reclaimed and nr_free_pages in struct event. When building with "-fsanitize=alignment -fsanitize-trap=undefined" failures happen in handle_event. Fix these by copying the event from the perf buffer before accessing. This is similar to a fix in exitsnoop where different ways to handle misaligned pointers were discussed: iovisor#4760 Signed-off-by: Ian Rogers <[email protected]>
- Loading branch information