[Bug c/77992] Provide feature to initialize padding bytes to avoid information leaks

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 17 17:47:00 GMT 2016


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.


More information about the Gcc-bugs mailing list