Page MenuHomeFreeBSD

modules: bzero the modspecific_t
ClosedPublic

Authored by khng on Jul 1 2023, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 4:09 PM
Unknown Object (File)
Oct 5 2024, 4:47 AM
Unknown Object (File)
Sep 27 2024, 2:36 PM
Unknown Object (File)
Sep 24 2024, 8:52 PM
Unknown Object (File)
Sep 18 2024, 8:15 PM
Unknown Object (File)
Sep 18 2024, 11:54 AM
Unknown Object (File)
Sep 16 2024, 4:09 AM
Unknown Object (File)
Sep 4 2024, 3:23 PM
Subscribers

Details

Summary

Per https://reviews.llvm.org/D68115, only the first field is
zero-initialized, meanwhile other fields are undef.

The pattern can be observed on clang as well, that when
-ftrivial-auto-var-init=pattern is specified 0xaa is filled for
non-active fields, otherwise they are zero-initialized.
Technically both are acceptable when using clang. However it
would be good to simply bzero the modspecific_t in such case to
strict to the standard.

MFC with: 2cab2d43b83bddd44ecc1f267afb5e2725975ac7
MFC after: 1 day
Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable