On Thu, Feb 13, 2014 at 05:18:10PM +0100, Eric Botcazou wrote:
> This adds proper variadic support to the SPARC port of libffi, thus fixing a
> regression in the testsuite in 64-bit mode, and fixes a small inaccuracy in
> the documentation.
>
> Tested on SPARC/Solaris and SPARC64/Solaris, applied on the mainline.
> +ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
> +{
> + cif->nfixedargs = cif->nargs;
> + return ffi_prep_cif_machdep_core (cif);
> +}
Eric, sorry to rain on your parade, but you're making the same mistake
I did at first when adding powerpc64le support to libffi. libffi is
built as a shared library. You can't add a field to ffi_cif like this
and uncondionally write to it: An application linked against an older
version of libffi will only allocate the old size ffi_cif. Your new
shared library will trash some random location in the old user app..
I worked around this problem on powerpc by defining new enum ffi_abi
values so that you can recognize an old app.
--
Alan Modra
Australia Development Lab, IBM