public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Possible issue with arm64 and multiple function arguments
@ 2015-01-12 22:08 Matti Picus
  0 siblings, 0 replies; only message in thread
From: Matti Picus @ 2015-01-12 22:08 UTC (permalink / raw)
  To: libffi-discuss

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-12 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12 22:08 Possible issue with arm64 and multiple function arguments Matti Picus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).