From: Matti Picus <matti.picus@gmail.com>
To: libffi-discuss@sourceware.org
Subject: Possible issue with arm64 and multiple function arguments
Date: Mon, 12 Jan 2015 22:08:00 -0000 [thread overview]
Message-ID: <54B4460B.60401@gmail.com> (raw)
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
reply other threads:[~2015-01-12 22:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B4460B.60401@gmail.com \
--to=matti.picus@gmail.com \
--cc=libffi-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).