iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
814 stars 132 forks source link

Jump target for PC 0 is wrong #458

Closed Alan-Jowett closed 4 months ago

Alan-Jowett commented 4 months ago

Setting of the offset -> PC target should occur after adjusting the stack, not before: https://github.com/iovisor/ubpf/blob/2bcb0150a414d6c50fe555df9069c2da8384eaed/vm/ubpf_jit_x86_64.c#L304

Failure to do this causes each loop iteration to adjust the stack on each jump to this location.