Page MenuHomeFreeBSD

sbuf: make assertion message a lot more useable
ClosedPublic

Authored by bz on Mar 18 2026, 4:00 PM.
Tags
None
Referenced Files
F153290468: D55919.id174090.diff
Mon, Apr 20, 7:02 AM
F153290417: D55919.id174090.diff
Mon, Apr 20, 7:02 AM
Unknown Object (File)
Sun, Apr 12, 5:07 PM
Unknown Object (File)
Tue, Apr 7, 7:42 AM
Unknown Object (File)
Tue, Apr 7, 4:23 AM
Unknown Object (File)
Fri, Apr 3, 2:48 PM
Unknown Object (File)
Fri, Apr 3, 5:13 AM
Unknown Object (File)
Wed, Apr 1, 7:52 PM
Subscribers

Details

Summary

Saying that we are called with an (un)finished or corrupted sbuf
is like saying "error" (though [un]finished is an extra hint).

Add the pointer to the sbuf so one could easily check it,
add the flags we are checking so one could see quickly about
a possible state mismatch.

Given we already dereference the pointer in the KASSERT there is no
extra harm adding it to the message.

Found while: testing lindebugfs changes
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable