Issue29804
Created on 2017-03-13 13:50 by ishcherb, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Python3.6.1rc1_build_log.txt | ishcherb, 2017-03-13 13:48 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1559 | erik.bray, 2017-05-19 09:39 | ||
| Messages (15) | |||
|---|---|---|---|
| msg289539 - (view) | Author: Iryna Shcherbina (ishcherb) * | Date: 2017-03-13 13:48 | |
I am trying to build Python 3.6.1rc1 on Fedora, and have the following test failing on arm64 (aarch64) architecture: ====================================================================== FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.1rc1/Lib/ctypes/test/test_structures.py", line 413, in test_pass_by_value self.assertEqual(s.first, 0xdeadbeef) AssertionError: 195948557 != 3735928559 ---------------------------------------------------------------------- The build log is attached. The test was added in this commit [1] as a fix for bpo-29565. Any idea what this can be related to? [1] https://github.com/python/cpython/commit/3cc5817cfaf5663645f4ee447eaed603d2ad290a |
|||
| msg289589 - (view) | Author: Iryna Shcherbina (ishcherb) * | Date: 2017-03-14 14:23 | |
Hi Vinay, I have added you to the nosy list as you are the author of the fix for bpo-29565, and would like to ask you for insights or ideas on why the test would fail only on one architecture (arm64)? |
|||
| msg289595 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2017-03-14 15:05 | |
The test checks that a structure passed by value is indeed passed by value - something that is architecture-dependent, as calling conventions differ across architectures. If the test fails, this indicates that the structure isn't being passed by value - a pointer to the structure is probably passed, which is pass-by-reference rather than pass-by-value. This indicates that a change to ctypes or libffi is needed to fix this. See the changes made in Modules/_ctypes/libffi_msvc/ffi.c for bpo-29565 - probably, analogous changes need to be made to the corresponding code for arm64. |
|||
| msg289669 - (view) | Author: Charalampos Stratakis (cstratak) * | Date: 2017-03-15 12:29 | |
Since this newly added assertion [0] fails for aarch64 shouldn't this be considered a regression? And taking into account the timeframe, a release blocker for 3.6.1? |
|||
| msg289670 - (view) | Author: Charalampos Stratakis (cstratak) * | Date: 2017-03-15 12:29 | |
[0] https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-39e8978a35ab16f78e60027c61b810f7R413 |
|||
| msg289674 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2017-03-15 13:32 | |
I don't think it's a regression. It's catching an error that was there, but wasn't tested for before. If it should be a release blocker - that should not be for any reversion of the change to the test, but for implementing the pass-by-value functionality correctly. |
|||
| msg290065 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2017-03-23 22:40 | |
Technically speaking, we do not officially support arm64 in our release process as we have no arm64 buildbots nor an identified core developer for the platform; see PEP 11 for the policy details. So there is no place to test a fix if there was one identified. That said, it would be good to fix the problem if someone is willing to provide a fix and test it or determine that the issue here is a libffi problem. It would be even better if we could make arm64 an officially supported platform as outlined. |
|||
| msg312200 - (view) | Author: Iryna Shcherbina (ishcherb) * | Date: 2018-02-15 11:00 | |
PR 1559 fixes the issue in Fedora builds on arm64. The issue is no longer reproducible with Python 3.7. |
|||
| msg312963 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-02-26 21:53 | |
Vinay, should this backported to 3.6? Otherwise, can the issue be closed? |
|||
| msg312964 - (view) | Author: Charalampos Stratakis (cstratak) * | Date: 2018-02-26 22:02 | |
The bug is still present on the 3.6 branch. |
|||
| msg312982 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2018-02-27 08:48 | |
> Vinay, should this back-ported to 3.6? Yes, I think it should be. |
|||
| msg313625 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-03-11 22:20 | |
OK, PR 1559 (in 3.7.0) for Issue30353 has been backported to 3.6 in PR 5954 for release in 3.6.5. So based on msg312200, I'm going to assume the problem is no longer reproducible in 3.6 and close this issue. If not, please reopen. |
|||
| msg322956 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-08-02 14:05 | |
This issue is mentioned from https://bugzilla.redhat.com/show_bug.cgi?id=1336557 but it seems like the bug has not been fixed in Python 2.7. I created PR 8625 to backport the fix to Python 2.7. |
|||
| msg322964 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-08-02 14:48 | |
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) https://github.com/python/cpython/commit/3243f8c1fb16b6de73f1d7a30f5d09047553bce3 |
|||
| msg322966 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-08-02 14:49 | |
I backported commit a86339b83fbd0932e0529a3c91935e997a234582 from master: commit 3243f8c1fb16b6de73f1d7a30f5d09047553bce3, but I don't have access to arm64, so I cannot test if the backport fixes test_ctypes on arm64. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:44 | admin | set | github: 73990 |
| 2018-08-02 14:49:59 | vstinner | set | messages: + msg322966 |
| 2018-08-02 14:48:27 | vstinner | set | messages: + msg322964 |
| 2018-08-02 14:05:54 | vstinner | set | nosy:
+ vstinner messages: + msg322956 |
| 2018-03-11 22:20:58 | ned.deily | set | status: open -> closed resolution: fixed messages: + msg313625 stage: resolved |
| 2018-02-27 08:48:58 | vinay.sajip | set | messages: + msg312982 |
| 2018-02-26 22:02:22 | cstratak | set | messages: + msg312964 |
| 2018-02-26 21:53:40 | ned.deily | set | messages:
+ msg312963 versions: + Python 3.7 |
| 2018-02-15 11:00:04 | ishcherb | set | messages: + msg312200 |
| 2017-05-19 09:39:43 | erik.bray | set | pull_requests: + pull_request1760 |
| 2017-04-24 13:14:28 | yan12125 | set | nosy:
+ yan12125 |
| 2017-03-23 22:40:03 | ned.deily | set | messages: + msg290065 |
| 2017-03-15 13:33:29 | vinay.sajip | set | nosy:
+ ned.deily |
| 2017-03-15 13:32:35 | vinay.sajip | set | messages: + msg289674 |
| 2017-03-15 12:29:54 | cstratak | set | messages: + msg289670 |
| 2017-03-15 12:29:12 | cstratak | set | nosy:
+ cstratak messages: + msg289669 |
| 2017-03-14 15:05:59 | vinay.sajip | set | messages: + msg289595 |
| 2017-03-14 14:23:19 | ishcherb | set | messages: + msg289589 |
| 2017-03-13 17:13:57 | ishcherb | set | nosy:
+ vinay.sajip |
| 2017-03-13 13:50:54 | ishcherb | create | |
