[New-bugs-announce] [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit
Erik Bray
report at bugs.python.org
Fri May 12 12:19:48 EDT 2017
New submission from Erik Bray:
The test ctypes.test.test_structures.StructureTestCase.test_pass_by_value fails on 64-bit Cygwin and MinGW using the system libffi with:
======================================================================
FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/embray/src/python/cpython/Lib/ctypes/test/test_structures.py", line 416, in test_pass_by_value
self.assertEqual(s.first, 0xdeadbeef)
AssertionError: 195948557 != 3735928559
It seems that libffi does not handle passing structs by value properly on those platforms as I explained here: https://github.com/libffi/libffi/issues/305
The upstream bug hasn't been confirmed yet by the libffi developers so I could be wrong, but I think this is fairly clearly broken there.
I have a PR forthcoming to work around the issue.
----------
components: ctypes
messages: 293556
nosy: erik.bray
priority: normal
severity: normal
status: open
title: ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30353>
_______________________________________
More information about the New-bugs-announce
mailing list