Details
Diff Detail
Event Timeline
This fixes an issue we are seeing with i386 JIT entry handling.
I have chosen a least disruptive change. However, since alignment is actually determined by the ABI, one could add some API to the ABI interface to determine the packing. However, it seemed like an overkill for doing something special only for i386.
Looks fine. One other alternative is to get the type from the program if it exists in the debug info and explore the struct using ValueObject. This would get you out of the fixed alignment issue by using the debug info to get the info. If the debug info is missing, you can always fall back to this code. I will leave that up to you.
Explicitly set the alignment of the size field in the unpacked struct
to 8 bytes. This should take care of the case where in the host is i386
and the target is arm (for example).
Thanks for the quick review.
I will put this in for now. Will revisit if a need for an elaborate solution arises.