qmonnet / rbpf

Rust virtual machine and JIT compiler for eBPF programs
Apache License 2.0
922 stars 235 forks source link

jit.rs: When emitting bytes, mark writing as unaligned #80

Closed qmonnet closed 1 year ago

qmonnet commented 1 year ago

To avoid cargo printing debug assertions about misaligned pointer dereferences when JIT-compiling programs for the tests, fix the way we write the bytes to explicitly tell rustc we may have misaligned accesses. No functional change.

Related: #77