-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
w32 struct return values #490
Comments
This is caused by a merge error in libffi proper, filed an issue. |
The |
twall
added a commit
that referenced
this issue
Sep 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If JNA is compiled with a different compiler than your target library, you may see a crash when returning a
struct
of size greater than 8 bytes. This is because GCC, mingw-gcc, and MSVC don't necessarily agree on how to handle such a scenario.This turned up when building and testing with mingw32 (x86 target) calling a callback with a returned
struct
. There is some accommodation within libffi to handle GCC vs MSVC calling conventions, but the JNA code should really test all permutations to ensure it works properly:Simple call to native function returning struct:
Call to native function returning struct returned by a provided callback. Note that the calling and callback handling glue (libffi) will always be compiled by the same compiler:
The text was updated successfully, but these errors were encountered: