[PATCH v2] linux: Enforce zero fill of siginfo_t
Yury Khrustalev
yury.khrustalev@arm.com
Tue Jan 27 16:00:28 GMT 2026
On Tue, Jan 27, 2026 at 04:38:56PM +0100, Andreas Schwab wrote:
> On Jan 27 2026, Yury Khrustalev wrote:
>
> > I agree that memset is probably better here. It's unknown where the
> > struct definition might come from. If a kernel header is used somehow,
> > pad is not first in there:
>
> The layout of the union doesn't matter.
>
Yes, mea culpa.
A compiler would probably call memset anyway (given the size of
128 bytes). Using `{0}` does look neat, but then this test is
susceptible to compiler bugs. Using memset explicitly should be
a good option for a test?
Thanks,
Yury
More information about the Libc-alpha
mailing list