-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
gh-110190: Fix ctypes structs with array on Arm #112604
Conversation
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Thanks, Diego! ✨ 🍰 ✨ |
Thanks @diegorusso for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Thanks @diegorusso for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @diegorusso and @ambv, I could not cleanly backport this to
|
Sorry, @diegorusso and @ambv, I could not cleanly backport this to
|
…112604) Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a)
GH-112766 is a backport of this pull request to the 3.11 branch. |
…112604) Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a)
…ngh-112604 on PPC64LE (pythonGH-112818) (cherry picked from commit 9f67042) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
…ngh-112604 on PPC64LE (pythonGH-112818) (cherry picked from commit 9f67042) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
@sunmy2019 This is an old document. The right version is https://files.openpower.foundation/s/cfA2oFPXbbZwEBK. Read my comment here: #110190 (comment) |
Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed.
@sunmy2019 and @Yhg1s the issue on PPC64LE has been fixed with #112959 |
…honGH-112959) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca4) Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310
…honGH-112959) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca4) Change-Id: I31730a3ebe558570ce1d7a3b26db8392f18d1770
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
…12959) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed.
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
…12959) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed.
…112604) (python#112766) Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830) (cherry picked from commit 9f67042) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…honGH-112959) (python#113167) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca4) Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310 Signed-off-by: Michał Górny <mgorny@gentoo.org>
…112604) (python#112766) Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830) (cherry picked from commit 9f67042) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…honGH-112959) (python#113167) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca4) Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310 Signed-off-by: Michał Górny <mgorny@gentoo.org>
…112604) (python#112766) Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830) (cherry picked from commit 9f67042) Signed-off-by: Michał Górny <mgorny@gentoo.org>
…honGH-112959) (python#113167) Fix the same issue of PR python#112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca4) Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms.
This because on Arm platforms structs with at most 4 elements of any
floating point type values can be passed through registers. If the type
is double the maximum size of the struct is 32 bytes.
By Arm platforms it is meant 32 and 64 bit.
On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.