iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
829 stars 136 forks source link

Handle call local seperately from regular jump instructions #467

Closed Alan-Jowett closed 5 months ago

Alan-Jowett commented 6 months ago

Resolves: #458 Resolves: #450

Modify handling of local calls during x64 JIT.

1) Change the PC target for jumps to point to instruction after the sub rsp,8" 2) Change the relocation to point to thesub rsp,8``` when relocating a local call.

This solves the problem where a jump to the start of a function misaligns the stack.

coveralls commented 6 months ago

Coverage Status

coverage: 81.54%. first build when pulling 711cfc065ef64654da01e51906e270e847a357e2 on Alan-Jowett:issue458 into ff4b48a8a6f062955e3f49cd9dba54624173a974 on iovisor:main.

Alan-Jowett commented 5 months ago

Converting to draft until I get this working again.