New submission from Maxime Belanger:

Greetings,

We're compiling a custom version of Python 2.7.9 for the Mac (building on OS X 
10.9 with Xcode 6.1), and we're instructing Python to use a vanilla copy of 
`libffi` (that we've also compiled ourselves) using the `--with-system-ffi` 
flag. We're running the regression test suite for sanity purposes and we've 
noticed this error in `test_ctypes`'s `test_longdouble` method:

======================================================================
FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"../Python.framework/Versions/2.7/lib/python2.7/ctypes/test/test_callbacks.py", 
line 88, in test_longdouble
    self.check_type(c_longdouble, 3.14)
  File 
"../Python.framework/Versions/2.7/lib/python2.7/ctypes/test/test_callbacks.py", 
line 24, in check_type
    self.assertEqual(result, arg)
AssertionError: 0.0 != 3.14

I'm reasonably convinced this is caused by the version of `libffi` we're using. 
It seems that if the `--with-system-ffi` flag isn't set, an internal version of 
`libffi` is used instead. However, given that version 3.1 is said to be the 
version Python 2.7.9 is "tracking", this feels like a bug to me. Also, it seems 
that trying to hit this code path in production code could trigger a crash.

----------
components: Tests, ctypes
messages: 236729
nosy: Maxime Belanger
priority: normal
severity: normal
status: open
title: `test_longdouble` fails on Mac when using system libffi (version 3.1)
type: crash
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23534>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to