From owner-freebsd-current@FreeBSD.ORG Sat Dec 14 07:42:02 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA15ED89 for ; Sat, 14 Dec 2013 07:42:02 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 24C051F62 for ; Sat, 14 Dec 2013 07:42:01 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA13146; Sat, 14 Dec 2013 09:41:54 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VrjrG-0003wD-Cy; Sat, 14 Dec 2013 09:41:54 +0200 Message-ID: <52AC0B88.5030403@FreeBSD.org> Date: Sat, 14 Dec 2013 09:40:56 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Sean Bruno Subject: Re: kasserts behind invariants References: <1386971425.37172.9.camel@powernoodle.corp.yahoo.com> <52AB8DA1.3000007@mu.org> <1386975951.37172.13.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1386975951.37172.13.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alfred Perlstein , freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2013 07:42:02 -0000 on 14/12/2013 01:05 Sean Bruno said the following: > In this specific instance, it would have been much better to simply > panic if(condition) than silently allowing the vendor driver to do > something stupid like initialize a mutex twice. I like Solaris/illumos approach of having ASSERT and VERIFY macros. ASSERT is compiled out when DEBUG is not set while VERIFY is always kept. -- Andriy Gapon