HomeFreeBSD

kqueue: fix the always-empty NT_PROCSTAT_KQUEUES core note

Description

kqueue: fix the always-empty NT_PROCSTAT_KQUEUES core note

sbuf reserves a byte of its buffer for the terminator, so the sbuf
created with maxlen held one byte less than the sizing pass had
computed. The last record overflowed it, sbuf_bcat() failed, and the
error == 0 guard skipped the copy into the caller's sbuf, so the note
has been emitted at full size but zero filled since 5e7c43ff02dc.

Fixes: 5e7c43ff02dc

Reviewed by: adrian, markj
Differential Revision: https://reviews.freebsd.org/D58583
MFC after: 1 week

Details

Provenance
seurosAuthored on Aug 3 2026, 6:11 PM
adrianCommitted on Aug 3 2026, 6:11 PM
Reviewer
adrian
Differential Revision
D58583: kqueue: fix the always-empty NT_PROCSTAT_KQUEUES core note
Parents
rG396e6d699556: bsd-family-tree: add NetBSD 11.0
Branches
Unknown
Tags
Unknown