Open RaoNikitha opened 1 month ago
The below test attempts to use r10 as a src register for JSLT. Libbpf and bpf2c both exhibit different undefined behavior. uBPF catches the error.
-- asm mov %r1, 2 mov %r0, 1 jslt %r10, %r1, lbl exit lbl: mov %r0, 0 exit -- result 0x1
Test execution outcome across three different plugins:
bpf2c
PASS: Test succeeded
libbpf
FAIL: Plugin returned incorrect return value 0 expected 1
uBPF
ERROR: Plugin returned error code 1 and output Failed to load code: invalid destination register at PC 2
The below test attempts to use r10 as a src register for JSLT. Libbpf and bpf2c both exhibit different undefined behavior. uBPF catches the error.
Test execution outcome across three different plugins:
bpf2c
libbpf
uBPF