[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2018-08-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6a6b2483479a1ad0ab82300452f0ce71fa90b2d7 by Victor Stinner in branch '2.7': bpo-29565: Fix compilation for C89 (GH-8626) https://github.com/python/cpython/commit/6a6b2483479a1ad0ab82300452f0ce71fa90b2d7 --

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2018-08-02 Thread STINNER Victor
STINNER Victor added the comment: Hum, the compilation succeeded on AppVeyor: https://ci.appveyor.com/project/python/cpython/build/2.7build20258 But it fails on AMD64 Windows8 2.7: https://buildbot.python.org/all/#/builders/74/builds/194 It seems like this buildbot uses Visual Studio 2008

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2018-08-02 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8133 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2018-08-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3243f8c1fb16b6de73f1d7a30f5d09047553bce3 by Victor Stinner in branch '2.7': bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625)

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2018-08-02 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8130 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New test causes a compiler warning: /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c: In function ‘_testfunc_large_struct_update_value’: /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c:53:42: warning: parameter ‘in’ set but not used

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3cc5817cfaf5663645f4ee447eaed603d2ad290a by GitHub in branch '3.6': Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#220)

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 8fa7e22134ac9626b2188ff877f6aeecd3c9e618 by GitHub in branch '3.5': Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#221)

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-21 Thread Steve Dower
Steve Dower added the comment: I approved the two backports. Thanks Vinay! -- ___ Python tracker ___ ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-21 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +185 ___ Python tracker ___ ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-21 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +184 ___ Python tracker ___ ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset a86339b83fbd0932e0529a3c91935e997a234582 by GitHub in branch 'master': Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: PR submitted. -- stage: needs patch -> patch review ___ Python tracker ___ ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +133 ___ Python tracker ___ ___

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: When adding the fix for #20160 I had added a test involving passing a struct by value to a Python callback. I modified that test to update the struct in the callback, and check that the passed-in struct hadn't changed. def test_callback_large_struct(self):

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-17 Thread Eryk Sun
Eryk Sun added the comment: This issue is more straight-forward than #22273. ISTM, we just have to copy large values. For example, in ffi_call, we'd iterate over the arguments and alloca and memcpy the large values prior to calling ffi_call_AMD64: case FFI_SYSV: /* If a single

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-16 Thread Steve Dower
Steve Dower added the comment: The contents of the struct is just being big enough to reach the point where it is passed by reference rather than by value. This issue is pointing out that it should be a reference to a temporary copy of the struct, so that if the called function modifies the

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-16 Thread Vinay Sajip
Vinay Sajip added the comment: Just trying to confirm my understanding - in both this issue and #22273, the example struct has a single array member. Is the problem confined just to how ctypes describes arrays in structs/unions to libffi? The comment on #22273 seems to suggest so. --

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-15 Thread Eryk Sun
Eryk Sun added the comment: Our support of passing structs and unions by value is really bad. Passing this particular struct by value is also broken on 64-bit Unix, but instead because it's small. It crashes Python due to an abort(). See issue 22273. -- nosy: +eryksun priority: normal

[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-15 Thread Igor Kudrin
New submission from Igor Kudrin: It looks like resolving https://bugs.python.org/issue20160 didn't fix all the issues. When a large struct is used as a parameter, a reference to the object itself is passed to the function, not a reference to a temporary copy, as it is required in