HomeFreeBSD

kvm_geterr: handle `kd` == NULL in a deterministic/graceful manner

Description

kvm_geterr: handle kd == NULL in a deterministic/graceful manner

Return a NUL string instead of just working by accident with kvm_geterr(3)
when MALLOC_PRODUCTION is disabled (I didn't confirm the MALLOC_PRODUCTION
being enabled path).

Document the new explicit return behavior for kvm_geterr(3), as well
as the previous implicit behavior, i.e., the buffer attached to
returned via kvm_geterr(3) would be empty if a previous error hadn't been
stored in kd.

Differential Revision: D10022
MFC after: 1 week
Reviewed by: vangyzen
Sponsored by: Dell EMC Isilon

Details

Provenance
ngieAuthored on
Reviewer
vangyzen
Differential Revision
D10022: Handle kd == NULL gracefully with kvm_geterr(3)
Parents
rS315685: tighten buffer bounds in imgact_binmisc_populate_interp
Branches
Unknown
Tags
Unknown