On 4 July 2016 at 12:28, Ed Schouten <e...@nuxi.nl> wrote: > 2016-07-04 21:08 GMT+02:00 Adrian Chadd <adrian.ch...@gmail.com>: >> Does the specification / implementation also mandate that the padding >> is zero'ed out or otherwise initialised? > > Well... That's tricky: > > https://stackoverflow.com/questions/13056364/is-zero-initialization-of-structures-guaranteed-to-wipe-padded-areas > https://gustedt.wordpress.com/2012/10/24/c11-defects-initialization-of-padding/
Right, so if we're not careful, we could leak bits of kernel memory, and it can also screw up key cache comparisons. (I asked this question because I've been screwed by it recentlyish, and it looks like the latest C standard didn't fix it..) -adrian _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"