New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture #73990
Comments
I am trying to build Python 3.6.1rc1 on Fedora, and have the following test failing on arm64 (aarch64) architecture: ====================================================================== 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. Any idea what this can be related to? [1] 3cc5817 |
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)? |
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. |
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? |
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. |
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. |
PR 1559 fixes the issue in Fedora builds on arm64. The issue is no longer reproducible with Python 3.7. |
Vinay, should this backported to 3.6? Otherwise, can the issue be closed? |
The bug is still present on the 3.6 branch. |
Yes, I think it should be. |
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: