From owner-svn-src-all@freebsd.org Fri May 25 20:27:39 2018 Return-Path: Delivered-To: svn-src-all@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 33BE1EF36ED; Fri, 25 May 2018 20:27:39 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 806EC72CFB; Fri, 25 May 2018 20:27:38 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wr0-x236.google.com with SMTP id a15-v6so11175774wrm.0; Fri, 25 May 2018 13:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=trwEcnOdVIUUOVulV0i7oQHeYt5Cc8AS2F4O93UJ/S0=; b=TL80OoXZSkhOO4DyeKbubMYp2Kpq6r07cghXNmynKHbf2DxBQjiaz5UnrllK8qEQML 4Rv0sKs4bhVAYXXnRnM0Ugl3mfZllHbRFzU2bc7RY/iqgjt7T0TMZEOhNcEjPj1hbU7E VWLzh7ZvcJamAANMl0cMGfGYyGnJKwtr0bFl4us1PeDEsBLfzyGkcp7fyzNisbIwKutK yRPh4LOWaUURxorcFciRnrXLToWiqo5D/owcpMGPfa/By1hFzm5PH6EhKoe83tRTN+kW qKA03TeKWKvZW21NeoKSCZqnjveDQ/Wk69bw86LrYMSs9Paq4HOjNc5smzdmJ9GEFmrR R1GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=trwEcnOdVIUUOVulV0i7oQHeYt5Cc8AS2F4O93UJ/S0=; b=J0kovg6S4PHdND07Vem84H5/DAVlaEDoW0iV1I6NuOgSdz4OVfpkm2TaKLCE8JI1wY MOGvf7Vcdlr8lYqM3byt8VlmzOFXO5TaBWZjljmwAaMkhou4IlmgYtlH7xM7sPWNpKbJ fQEegmyBou0ej7mvfi8nFUrWebV+Y8YOMLuV5D8IrpW/lC+SUSKGS4TFSD6wiJn3LBE/ 7mCIumygKVTiUQI0Zr/VUq8qABsh7NFpBBf4AO/ehHAhnzxddu+NpYpgKA8M3n3Gwc0j iboQzxTXNhodkGYwOZfAAr0JRYiYYrfnu4Hg8OXDzZwC7xQA8U360lcs0QYdp/wjFcy6 6oeg== X-Gm-Message-State: ALKqPwfY9E2LhZcq4yzMlwI3yCKkEJtlRPlCiEX6Id/d1rouVkvf9dzE teMFoyg0kWn3ZotzHCAHmY6WO1efrQCcMCCn8/s= X-Google-Smtp-Source: ADUXVKIW5tupC5dzjalu/HeYTFSTgExGALvUf7vsKrx6IhcpII4qk21rOJNCM18DIlgTZwdl7fZ28folyM5V3g7dZAw= X-Received: by 2002:a19:f611:: with SMTP id x17-v6mr2291201lfe.116.1527280057256; Fri, 25 May 2018 13:27:37 -0700 (PDT) MIME-Version: 1.0 References: <201805252022.w4PKMdPY047389@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201805252022.w4PKMdPY047389@pdx.rh.CN85.dnsmgr.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 26 May 2018 04:27:25 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Marcelo Araujo , Warner Losh , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:27:39 -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! What I have been saying the issue is all around and we need to fix it. Please don't twist my words! Best, > > -- > Rod Grimes > rgrimes@freebsd.org >