tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: KASSERT and clang static analyzer



On Tue, Apr 18, 2017 at 10:37:42AM -0700, Alistair Crooks wrote:
> or fix clang not to be stupid

I don't think the fault is with clang here. All available information
says there is a set of conditions that lead to a division by zero.

> > Marking kern_assert as __dead should at least let the static analyzer
> > do the reasoning it needs, though if we want to preserve the behaviour
> > that kern_assert returns if we're in a panic, then we must be careful
> > not to compile the code with kern_assert marked as __dead, because
> > clang will yield completely different behaviour in that case.

Not only clang. The question is how much sense that behavior still
makes. ddb magic is already quite fragile in an MP world.

Joerg


Home | Main Index | Thread Index | Old Index