Re: Fatal trap 1

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 22 Dec 2012 13:44:49 +0200
on 22/12/2012 13:21 Konstantin Belousov said the following:
> This is due to the vtoslab() returning NULL. Since slabref is dereferenced
> later, clang tries to be helpful as usual and converts the !(p->flags &
> PG_SLAB) case from vtoslab() into the jump to un2 instruction if vtoslab()
> result is NULL.
> 
> So instead of KASSERT triggering the next line, you see this improvement.

Interesting.  Thank you for the explanation.

But looking at the code I think that slabref->us_keg access _before_ KASSERT
is the culprit?  I.e. even with GCC we could get a page fault before the
KASSERT is reached (modulo reordering)?

-- 
Andriy Gapon
Received on Sat Dec 22 2012 - 10:44:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC