HomeFreeBSD

witness: Unconditionally initialize out-params for witness_save()

Description

witness: Unconditionally initialize out-params for witness_save()

As of LLVM 16, the -fsanitize-memory-param-retval option is set to true
by default, meaning that MSan will eagerly report uninitialized function
parameters and return values, even if they are not used. A
witness_save()/witness_restore() call pair fails this test since
witness_save() may return before saving file and line number
information.

Modify witness_save() to initialize the out-params unconditionally; this
appears to be the only instance of the problem triggered when booting to
a login prompt, so let's just address it directly.

Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
MFC after: 1 week

Details

Provenance
markjAuthored on Oct 16 2023, 5:23 PM
Parents
rG4f8f43b06ed0: netlink: cope with growing requests
Branches
Unknown
Tags
Unknown