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

Remove the use of mem::zeroed() from generated code #35

Merged
merged 1 commit into from
May 12, 2022

Conversation

JohnTitor
Copy link
Owner

@JohnTitor JohnTitor commented May 10, 2022

Fixes #31

@JohnTitor
Copy link
Owner Author

@joshtriplett Do you have any chance to use this patch before merging?

@joshtriplett
Copy link
Contributor

@JohnTitor That partially fixes the issue, but the other uses of zeroed in the generated code also need updating.

@JohnTitor JohnTitor changed the title Tweak offset_of macro on generated code Remove the use of mem::zeroed() from generated code May 11, 2022
@JohnTitor
Copy link
Owner Author

Good call, I totally overlooked them.
Now there's no use of mem::zeroed(), could you re-check?

@joshtriplett
Copy link
Contributor

joshtriplett commented May 12, 2022

@JohnTitor That fixed the problem, thank you! I can run the libz-sys systest suite with ctest2 from this PR branch.

@JohnTitor JohnTitor merged commit 6d2dd7d into master May 12, 2022
@JohnTitor JohnTitor deleted the fix-offset-of-again branch May 12, 2022 09:15
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.

offset_of assumes structure can be zero-initialized
2 participants