From: "Jan Beulich" Subject: Re: [PATCH v2 1/3] x86: also allow REP STOS emulation acceleration Date: Mon, 12 Jan 2015 15:27:00 +0000 Message-ID: <54B3F5D40200007800053DD1@mail.emea.novell.com> References: <54AEB49C0200007800052BDE@mail.emea.novell.com> <54AEB5690200007800052BF1@mail.emea.novell.com> <54AEDA80.4080405@citrix.com> <54AFBB3C02000078000530D4@mail.emea.novell.com> <54AFB3FA.1050000@citrix.com> <20150109111831.GA99970@deinos.phlegethon.org> <54AFC88F02000078000531D0@mail.emea.novell.com> <20150109114505.GB99970@deinos.phlegethon.org> <54AFD355020000780005321C@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YAgtV-0008II-5j for xen-devel@lists.xenproject.org; Mon, 12 Jan 2015 15:27:05 +0000 In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Andrew Cooper , Tim Deegan , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 12.01.15 at 15:54, wrote: > On Fri, Jan 9, 2015 at 12:10 PM, Jan Beulich wrote: >>>>> On 09.01.15 at 12:45, wrote: >>> At 11:24 +0000 on 09 Jan (1420799087), Jan Beulich wrote: >>>> >>> On 09.01.15 at 12:18, wrote: >>>> >> > + default: >>>> >> > + xfree(buf); >>>> >> > + ASSERT(!buf); >>>> > >>>> > looks dodgy... >>>> >>>> In which way? The "default" is supposed to be unreachable, and sits >>>> in the else branch to an if(!buf), i.e. in a release build we'll correctly >>>> free the buffer, while in a debug build the ASSERT() will trigger. >>> >>> Oh I see. Can you please use ASSERT(0) for that? >> >> I sincerely dislike ASSERT(0), but if that's the only way to get >> the patch accepted... > > Um, by what set of criteria is ASSERT(!buf) better than ASSERT(0)? At > least the second tells the reader that you're not using ASSERT() the > normal way. Because the resulting message ("0") is completely meaningless, while for "!buf" you at least have a chance of finding the original ASSERT() without line numbers matching up 100%. Jan