This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77992] Provide feature to initialize padding bytes to avoid information leaks
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Oct 2016 17:39:08 +0000
- Subject: [Bug c/77992] Provide feature to initialize padding bytes to avoid information leaks
- Auto-submitted: auto-generated
- References: <bug-77992-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992
--- Comment #16 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Obviously any fields implicitly inserted like that must be ignored by the
front ends when processing positional initializers - an initializer { 1,
2, 3 } must initialize three explicitly declared fields and ignore any
inserted padding fields between them (to be implicitly initialized with
0).
Presumably you'd want such padding fields to be inserted for unused bits
in the presence of bit-fields, and you'd want to make sure unnamed
bit-fields, and bits unused as a result of an unnamed bit-field of width
0, get properly initialized as well in the presence of such an option.