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 tcplife
The perf buffer in tcplife doesn't maintain 8 byte alignment for saddr, daddr, ts_us, span_us, rx_b and tx_b 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