Page MenuHomeFreeBSD

modules: bzero the modspecific_t
ClosedPublic

Authored by khng on Jul 1 2023, 7:47 PM.
Tags
None
Referenced Files
F159722634: D40830.id124077.diff
Wed, Jun 17, 12:36 PM
Unknown Object (File)
Mon, Jun 8, 7:35 AM
Unknown Object (File)
Wed, Jun 3, 4:12 AM
Unknown Object (File)
May 15 2026, 10:27 AM
Unknown Object (File)
May 15 2026, 10:01 AM
Unknown Object (File)
May 14 2026, 4:52 PM
Unknown Object (File)
May 13 2026, 11:00 PM
Unknown Object (File)
May 13 2026, 10:59 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 52374
Build 49265: arc lint + arc unit