Skip to content

Add -fzero-init-padding-bits to Compiler Options Hardening Guide for C and C++ #919

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

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

Conversation

thomasnyman
Copy link
Contributor

@thomasnyman thomasnyman commented Jun 12, 2025

This flag reduces the risk that an incomplete initialization reveals sensitive information and can be used to achieve consistent behaviors for union and struct initializers across GCC versions.

Fixes #857

thomasnyman and others added 3 commits June 12, 2025 14:20
Signed-off-by: Thomas Nyman <thomas.nyman@ericsson.com>
…w should this guide be applied?"

Co-authored-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: Thomas Nyman <thomas.nyman@ericsson.com>
Signed-off-by: Thomas Nyman <thomas.nyman@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider -fzero-init-padding-bits=all for C and C++ Compiler Hardening Guide
1 participant