libffi ABI change causes stack corruption on Debian

Alan Modra amodra@gmail.com
Thu Nov 21 10:39:00 GMT 2013


On Thu, Nov 21, 2013 at 09:08:25AM +1030, Alan Modra wrote:
> Shame on me for not thinking of these shared library issues..
> 
> ELFv2 needs those extra fields because ELFv2 doesn't always have a
> parameter save area.  Therefore we don't have the luxury of writing fp
> values to both an fpr save area (used when passing fp values in fprs)
> and the parameter save area (used when passing fp values on the
> stack).  This in turn means we must distinguish calls to functions
> with variable arguments from calls to normal functions.  Prior to the
> patch series you identify above, powerpc libffi did not do that.  So
> to be backwards compatible, for ELFv1 I need to avoid use of the extra
> fields and continue to write fp values to both fpr and parameter save
> areas.  This is a royal pain, but possible, I think.
> 
> Anthony, please hold off on merging
> https://sourceware.org/ml/libffi-discuss/2013/msg00218.html which has
> even worse backwards compatibility issues with cif->abi values.

Attached is a replacement for
https://sourceware.org/ml/libffi-discuss/2013/msg00218.html that fixes
backwards compatibility issues.

-- 
Alan Modra
Australia Development Lab, IBM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Tidy-powerpc-linux-support.patch.gz
Type: application/octet-stream
Size: 24068 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libffi-discuss/attachments/20131121/739ae5d3/attachment.obj>


More information about the Libffi-discuss mailing list