This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JohnsonCW
Recipients JohnsonCW, illumino, theller
Date 2009-05-21.20:25:04
SpamBayes Score 1.7275671e-09
Marked as misclassified No
Message-id <1242937510.08.0.35248517538.issue6029@psf.upfronthosting.co.za>
In-reply-to
Content
Turns out the problem is really in the Sparc version of libffi -- the 
ffi_closure_sparc_inner_v9 function in 
Modules/_ctypes/libffi/src/sparc/ffi.c wasn't properly accounting for 
the 16-byte alignment of a long double in an argument stack -- it 
presumed 8-byte alignment throwing off any long double value after a 
shorter value.  (16-byte alignment is specified in the SPARC Compliance 
Definition.)

I've attached a patch which I'm sure could be improved (there's 
probably a more proper way to do things in libffi) but it passes the 
check tests for ctypes and a few other tests I threw in.


By the way, I noticed that one of the test cases in the script I added 
in my last comment has an error in its success/failure test ... 
the "(typ, c_byte)" test should check for the result of -3 instead of 
3.14.
History
Date User Action Args
2009-05-21 20:25:11JohnsonCWsetrecipients: + JohnsonCW, theller, illumino
2009-05-21 20:25:10JohnsonCWsetmessageid: <1242937510.08.0.35248517538.issue6029@psf.upfronthosting.co.za>
2009-05-21 20:25:08JohnsonCWlinkissue6029 messages
2009-05-21 20:25:06JohnsonCWcreate