Vinay Sajip added the comment:

Thanks for spelling it out for me, that's helpful. But I'm still confused about 
a couple of things: I can't find classify_argument in the Python source tree 
other than in

Modules/_ctypes/libffi_osx/x86/x86-ffi64.c

Is that the file you referred to as ffi64.c? I assumed this is only used on OS 
X. Do we just use the system libffi on Linux?

I also note that if I use the following:

typedef struct {
    int foo;
    int bar;
    unsigned char data[8];
} Test;

which is certainly the same size of struct, there's no abort and the sum is 
correctly calculated and returned as 28, which is printed by the Python script. 
If I swap things around so that the array comes first in the structure, that 
also works. If I increase the array size back to 16 (giving a total structure 
size of 24), that also works. If I then comment out the 'int foo' and 'int bar' 
fields in both C and Python, the abort reappears.

----------

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

Reply via email to