rbpf icon indicating copy to clipboard operation
rbpf copied to clipboard

jit/x86: Windows support

Open ndrewh opened this issue 3 years ago • 3 comments

This contribution is on behalf of Trail of Bits. This depends on the refactor in #358.

This adds Windows support to the x86 JIT. The only differences are we have to use the windows virtual memory API (ie. VirtualAlloc, etc.) and we have to abide by slightly different calling conventions. This was not tested on ARM64 windows.

Windows support passes tests, but is not ready for production use, and is gated behind a feature flag: jit-windows-not-safe-for-production.

This also includes a few extra comments documenting parts of the x86 JIT.

Fixes: #217

ndrewh avatar Jul 21 '22 07:07 ndrewh

I cannot run my fuzzers with this; I don't currently have access to Windows machines.

addisoncrump avatar Jul 21 '22 23:07 addisoncrump

@ndrewh: First of all, sorry for the very late reply, which caused this very nice contribution to diverge so much from our main branch. If you still want to contribute this, could you separate the windows form the ARM stuff and rebase it? That would be really appreciated!

Lichtso avatar Nov 14 '22 16:11 Lichtso

The win api part of this PR is merged with #422.

Lichtso avatar Dec 01 '22 21:12 Lichtso