This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Possible issue with arm64 and multiple function arguments
- From: Matti Picus <matti dot picus at gmail dot com>
- To: libffi-discuss at sourceware dot org
- Date: Tue, 13 Jan 2015 00:09:15 +0200
- Subject: Possible issue with arm64 and multiple function arguments
- Authentication-results: sourceware.org; auth=none
I submitted a bug fix for python ctypes on win64 where pass-by-value was
failing for structs bigger than 8 bytes. I based the fix on the cffi
library for python, which uses a custom MSVC backend and not the latest
libffi. Sorry about that, maybe someday I will take a look as MSVC
compilation of libffi. But that is not the point of this mail :).
The fix involved writing a test of a function with 8 parameters, some
by-pointer structs and some by-ref structs. This test was written to
pass on all platforms, but this bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1174037
indicates it fails on arm64 (aarch64) linux. The gist of the test is c code and a call from python, and I have copy-pasted the relevant parts to here
https://gist.github.com/mattip/9e41a3a7f4361a372c67
I could not find anything similar in your test suite, but I am new to your code.
So now the questions:
- is there a test like this in the suite that I overlooked?
- if not, where would be an appropriate place to add such a test?
- could there indeed be a bug in arm64 where the arguments spill out of registers into the stack, and why would it not show up on arm32 (which passes the test)?
Thanks for your great library.
Matti