Author rkuska
Recipients rkuska
Date 2015-01-16.09:41:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Original bug report at
Additional informations at Issue #20160

Note that this was reproduced not only with separate libffi package but also with libffi bundled in python.
Reproduced with Python 2.7.9 but same issue should exists also in 3.4.x.

Richard Henderson provided fix in original bug report at bugzilla (attached).

FAIL: test_struct_by_value (ctypes.test.test_win32.Structures)
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.9/Lib/ctypes/test/", line 112, in test_struct_by_value
    self.assertEqual(ret.left, left.value)
AssertionError: -200 != 10

(gdb) b ReturnRect
Function "ReturnRect" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ReturnRect) pending.
(gdb) run
Starting program: /usr/bin/python
Missing separate debuginfos, use: debuginfo-install glibc-2.20.90-12.fc22.aarch64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/".

Breakpoint 1, ReturnRect (i=0, ar=..., br=0x59b750, cp=..., dr=..., er=0x59b750, fp=..., 
    gr=<error reading variable: Cannot access memory at address 0xffff000000000000>)
    at /usr/src/debug/Python-2.7.9/Modules/_ctypes/_ctypes_test.c:552
552	    if (ar.left + br->left + dr.left + er->left + gr.left != left * 5)
(gdb) p fp
$1 = {x = 4396722194992, y = 5879632}
(gdb) p cp
$2 = {x = 15, y = 25}

Consider to apply a patch or update bundled libffi.
Date User Action Args
2015-01-16 09:41:23rkuskasetrecipients: + rkuska
2015-01-16 09:41:23rkuskasetmessageid: <>
2015-01-16 09:41:23rkuskalinkissue23249 messages
2015-01-16 09:41:22rkuskacreate