From owner-svn-src-head@freebsd.org Fri May 25 20:32:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F770EF38F9; Fri, 25 May 2018 20:32:52 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A1267315D; Fri, 25 May 2018 20:32:51 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4PKWnrk047433; Fri, 25 May 2018 13:32:49 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4PKWnOF047432; Fri, 25 May 2018 13:32:49 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805252032.w4PKWnOF047432@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve In-Reply-To: To: araujo@freebsd.org Date: Fri, 25 May 2018 13:32:49 -0700 (PDT) CC: "Rodney W. Grimes" , Warner Losh , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:32:52 -0000 > On Sat, May 26, 2018, 4:22 AM Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > On Sat, May 26, 2018, 4:09 AM Warner Losh wrote: > > > > > > > > > > > > > > > On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > > > > > > > >> On 25 May 2018 at 14:26, Marcelo Araujo > > wrote: > > > >> > > > > >> >> The fact that we don't do NDEBUG builds normally does not allow us > > to > > > >> >> ignore that it exists. It's perfectly reasonable for a user to > > build > > > >> >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail > > to > > > >> >> handle resource errors with NDEBUG set then it needs something like > > > >> this > > > >> >> at the top of the file: > > > >> > > > > >> > Please document it in some place! > > > >> > > > >> NDEBUG is documented in assert(3). The man page should have more of an > > > >> explanation (and examples) of the possible pitfalls of assert() > > > >> though > > > >> > > > > > > > > NDEBUG has been documented in the assert man page since it entered Unix > > > > via PBW in the 7th Edition Unix from Bell Labs. It's part of the C > > > > standard, as well as many POSIX and SVID docs. > > > > > > > > > > Yes I can read that! Now tell me, do we build FreeBSD without assert? > > > > > > If we do, probably we can't run it without crash! > > > > So that makes it perfectly fine to continue what is a well known bad > > practice? I do not think so. > > > > Many people have tried to persuade you that the *proper* way to check > > the return from a function is with an if statement, not with an assert, > > please try to accept that this is pretty much standard accepted portable > > 'C' coding, and realize all those places you see assert(foo) checking > > the return of a function are more than likely lurking bugs to be fixed. > > > > I never said that I didn't accepted that! You flat out rejected it, more than once, and from more than one source. > What I have been saying the issue > is all around and we need to fix it. You never said we need to fix any of the asserts until prehaps just now. > Please don't twist my words! I did not twist your words. -- Rod Grimes rgrimes@freebsd.org