You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== RUN TestInstructions
main_test.go:29: instructions: parse line info: parsing BTF line info: offset 1 is not aligned with instruction size
--- FAIL: TestInstructions (0.00s)
Expected behavior
With version 0.11.0 the method does not fail and produces the output:
Thanks for the report! I have it locally reproduced.
When we parse the offsets from ELF we divide the instruction offset of the line info to go from a byte offset to an instruction offset here
However, when we use the same logic to parse from the kernel we should do the reverse. Same goes for the parse functions of funcInfo and CORERelo as well
Describe the bug
With version 0.12.0 calling
ProgramInfo.Instructions
returns:With 0.11.0 the method returns the Instructions as expected.
To Reproduce
Given a simple XDP program in
src/src.c
, that doesn't do much, but more than just returning:And a simple go test program:
The test fails with:
Expected behavior
With version 0.11.0 the method does not fail and produces the output:
The text was updated successfully, but these errors were encountered: