nativelibs4java / BridJ

BridJ: blazing fast Java / C / C++ interop
https://code.google.com/archive/p/bridj/
Other
289 stars 77 forks source link

Unaligned pointer access in packed struct #106

Open GiulianoFranchetto opened 5 years ago

GiulianoFranchetto commented 5 years ago

Hi,

My C library is using some packed struct. When I use such structure, everything goes OK in the native library, but when it comes back to the Java world, the content of the struct is false.

I tried to force @Struct(pack = 1), but I get Unaligned pointer access exceptions when trying to get some fields.

Is it impossible to use packed struct with BridJ?

Best regards