HomeFreeBSD

modules: bzero the modspecific_t

Description

modules: bzero the modspecific_t

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
be strict to the standard.

MFC with: 2cab2d43b83b
MFC after: 1 day
Sponsored by: Juniper Networks, Inc.
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D40830

Details

Provenance
khngAuthored on Jul 1 2023, 7:41 PM
Reviewer
delphij
Differential Revision
D40830: modules: bzero the modspecific_t
Parents
rG84deca4d8ca2: libkern: Trim OBE comment from divmoddi routines.
Branches
Unknown
Tags
Unknown