Skip to content
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

Merged
merged 6 commits into from
Dec 5, 2023
Merged

Conversation

diegorusso
Copy link
Contributor

@diegorusso diegorusso commented Dec 1, 2023

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.

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.
Copy link

cpython-cla-bot bot commented Dec 1, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Dec 1, 2023

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 skip news label instead.

@ambv ambv added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 1, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ambv for commit 34f9c99 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 1, 2023
@ambv ambv merged commit bc68f4a into python:main Dec 5, 2023
@ambv
Copy link
Contributor

ambv commented Dec 5, 2023

Thanks, Diego! ✨ 🍰 ✨

@ambv ambv added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Dec 5, 2023
@miss-islington-app
Copy link

Thanks @diegorusso for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @diegorusso for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @diegorusso and @ambv, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bc68f4a4abcfbea60bb1db1ccadb07613561931c 3.11

@miss-islington-app
Copy link

Sorry, @diegorusso and @ambv, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bc68f4a4abcfbea60bb1db1ccadb07613561931c 3.12

diegorusso added a commit to diegorusso/cpython that referenced this pull request Dec 5, 2023
…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)
@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2023

GH-112766 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 5, 2023
diegorusso added a commit to diegorusso/cpython that referenced this pull request Dec 5, 2023
…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)
ambv added a commit to ambv/cpython that referenced this pull request Dec 7, 2023
…ngh-112604 on PPC64LE (pythonGH-112818)

(cherry picked from commit 9f67042)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Yhg1s pushed a commit that referenced this pull request Dec 7, 2023
…n PPC64LE (GH-112818) (#112829)

(cherry picked from commit 9f67042)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
ambv added a commit to ambv/cpython that referenced this pull request Dec 7, 2023
…ngh-112604 on PPC64LE (pythonGH-112818)

(cherry picked from commit 9f67042)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
@diegorusso
Copy link
Contributor Author

@sunmy2019 This is an old document. The right version is https://files.openpower.foundation/s/cfA2oFPXbbZwEBK. Read my comment here: #110190 (comment)

ambv added a commit that referenced this pull request Dec 8, 2023
diegorusso added a commit to diegorusso/cpython that referenced this pull request Dec 11, 2023
Fix the same issue of PR python#112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.
@diegorusso
Copy link
Contributor Author

@sunmy2019 and @Yhg1s the issue on PPC64LE has been fixed with #112959

ambv pushed a commit that referenced this pull request Dec 13, 2023
Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.
diegorusso added a commit to diegorusso/cpython that referenced this pull request Dec 15, 2023
…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
diegorusso added a commit to diegorusso/cpython that referenced this pull request Dec 15, 2023
…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
ambv pushed a commit that referenced this pull request Jan 5, 2024
#113167)

Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.

(cherry picked from commit 6644ca4)
Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310
ambv pushed a commit that referenced this pull request Jan 5, 2024
#113170)

Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.

(cherry picked from commit 6644ca4)
Change-Id: I31730a3ebe558570ce1d7a3b26db8392f18d1770
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
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.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…12959)

Fix the same issue of PR python#112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…12959)

Fix the same issue of PR python#112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830)

(cherry picked from commit 9f67042)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830)

(cherry picked from commit 9f67042)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…ngh-112604 on PPC64LE (pythonGH-112818) (python#112830)

(cherry picked from commit 9f67042)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants