Commit 4b0454b
committed
bpftool: Fix control flow graph segfault during edge creation
JIRA: https://issues.redhat.com/browse/RHEL-85486
commit defac89
Author: Christoph Werle <christoph.werle@longjmp.de>
Date: Wed Jan 8 23:09:37 2025 +0100
bpftool: Fix control flow graph segfault during edge creation
If the last instruction of a control flow graph building block is a
BPF_CALL, an incorrect edge with e->dst set to NULL is created and
results in a segfault during graph output.
Ensure that BPF_CALL as last instruction of a building block is handled
correctly and only generates a single edge unlike actual BPF_JUMP*
instructions.
Signed-off-by: Christoph Werle <christoph.werle@longjmp.de>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Quentin Monnet <qmo@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20250108220937.1470029-1-christoph.werle@longjmp.de
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>1 parent e9e1fe5 commit 4b0454b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| |||
0 commit comments