CasualX / pelite

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
MIT License
280 stars 42 forks source link

32-bit linux build broken #261

Closed h33p closed 1 year ago

h33p commented 2 years ago

It appears that IMAGE_DYNAMIC_RELOCATION64 size constraint is violated on 32-bit Linux environments. See the error in our CI: https://github.com/memflow/memflow-qemu/runs/7271610781. Could this be an alignment issue? Or should size of an array be checked instead, like done in memflow?

CasualX commented 2 years ago

From this random person's copy of what appears to be win10 sdk it appears I just got the definition wrong.

Notice this block is surrounded by #include "pshpack1.h", that sets the struct alignment to 1.

CasualX commented 2 years ago

This problem only crops up now because in 0.9.1 I assert the sizes of structs at compile-time, where before they would only be checked at test time.