Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2012 15:19:04 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r238828 - head/sys/sys
Message-ID:  <20120727111904.GQ14135@FreeBSD.org>
In-Reply-To: <20120727111237.GC2676@deviant.kiev.zoral.com.ua>
References:  <201207270916.q6R9Gm23086648@svn.freebsd.org> <20120727111237.GC2676@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 27, 2012 at 02:12:37PM +0300, Konstantin Belousov wrote:
K> On Fri, Jul 27, 2012 at 09:16:48AM +0000, Gleb Smirnoff wrote:
K> > Author: glebius
K> > Date: Fri Jul 27 09:16:48 2012
K> > New Revision: 238828
K> > URL: http://svn.freebsd.org/changeset/base/238828
K> > 
K> > Log:
K> >   Add assertion for refcount overflow.
K> >   
K> >   Submitted by:	Andrey Zonov <andrey zonov.org>
K> >   Reviewed by:	kib
K> It was discussed rather then reviewed.
K> 
K> I suggest that the assert may be expressed as a check after the increment,
K> which verifies that counter is != 0. This allows to avoid namespace
K> pollution due to limits.h.

Hmm, overflowing unsigned is a defined behavior in C. If Bruce agrees,
then I'm happy with KASSERT after increment.

-- 
Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120727111904.GQ14135>