svn commit: r332860 - head/sys/kern
Conrad Meyer
cem at freebsd.org
Sat Apr 21 17:59:07 UTC 2018
On Sat, Apr 21, 2018 at 10:41 AM, Bruce Evans <brde at optusnet.com.au> wrote:
> panic() can't return, but I see that KASSERT() has already been broken
> to use kassert_panic() which does return in some cases including this
> new one.
Oddly enough, I find myself agreeing with Bruce on this. That
kassert_panic does not always assert, during ordinary (non-panic)
runtime, based on a runtime configurable toggle breaks the concept of
invariants and confuses the heck out of static analyzers like
Coverity.
Ideally, we just remove it. IMO it is a crappy hack that should have
remained in iX's local tree.
If we want to be really generous, we can make it an off-by-default
build option. Is anyone clamoring for allowing violation of multiple
assertions without panic, other than Linus Torvalds?
> KASSERT(9) is still documented to call panic(), and none of the options
> to break it including this new one, or kassert_panic() itself are
> documented in KASSERT(9) or in any other section 9 man page.
Yeah. This is unfortunate :-(.
Best,
Conrad
More information about the svn-src-head
mailing list