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-128889: Zero out memory ctypes for generated struct layout tests #128944

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

encukou
Copy link
Member

@encukou encukou commented Jan 17, 2025

GCC 15 doesn't set padding bits to zero (as it's allowed, according to standard). Let's zero the test structs explicitly.

Even with this PR, the tests still depend on the compiler keeping padding bits unchanged when surrounding values are set. (AFAIK, this is not guaranteed by the standard, and when bitfields are involved, changing padding bits might make sense as an optimization.)
Removing that limitation will be easier with introspection attributes I want to add in gh-128715.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant