Bug#774787: python-cffi: FTBFS on mips64el

2015-01-08 Thread James Cowgill
On Thu, 2015-01-08 at 09:03 -0800, Stefano Rivera wrote:
> Hi James (2015.01.07_08:17:19_-0800)
> > I worked around it using the attached patch which disables the test on
> > mips64 systems. I'm not entirely sure this is the "right" thing to do
> > though since it does look like there's a bug here.
> 
> Given the abuse comment below, this looks perfectly reasonable to me.
> 
> I applied it upstream, too, thanks.
> 
> https://bitbucket.org/cffi/cffi/commits/67435ba27473de84824708c1f222bb915ddb1e03

OK then, thanks.

James


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#774787: python-cffi: FTBFS on mips64el

2015-01-08 Thread Stefano Rivera
Hi James (2015.01.07_08:17:19_-0800)
> I worked around it using the attached patch which disables the test on
> mips64 systems. I'm not entirely sure this is the "right" thing to do
> though since it does look like there's a bug here.

Given the abuse comment below, this looks perfectly reasonable to me.

I applied it upstream, too, thanks.

https://bitbucket.org/cffi/cffi/commits/67435ba27473de84824708c1f222bb915ddb1e03

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 461 1230 C: +27 72 419 8559


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#774787: python-cffi: FTBFS on mips64el

2015-01-07 Thread James Cowgill
Source: python-cffi
Version: 0.8.6-1
Severity: important

Hi,

python-cffi FTBFS on mips64el with a segfault in the testsuite:

> testing/test_verify.py 
> ..s.s.s.s
> testing/test_verify2.py 
> ..s.s.s.s
> testing/test_version.py .
> Segmentation fault
> E: pybuild pybuild:256: test: plugin custom failed with: exit code=139: 
> python2.7 -m pytest c/ testing/

I did a bit of debugging which tracked it down to a segfault within
function in the libffi mips backend, caused by the test
test_opaque_integer_as_function_result in test_verify.py

It looked like CFFI told libffi that the return type of the function was
a structure of size 2 but with no elements - that seems illegal to me.

I worked around it using the attached patch which disables the test on
mips64 systems. I'm not entirely sure this is the "right" thing to do
though since it does look like there's a bug here.

Thanks,
James
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -1162,6 +1162,8 @@ def test_opaque_integer_as_function_resu
 import platform
 if platform.machine().startswith('sparc'):
 py.test.skip('Breaks horribly on sparc (SIGILL + corrupted stack)')
+elif platform.machine() == 'mips64' and sys.maxsize > 2**32:
+py.test.skip('Segfaults on mips64el')
 # XXX bad abuse of "struct { ...; }".  It only works a bit by chance
 # anyway.  XXX think about something better :-(
 ffi = FFI()