From: Ian Jackson Subject: Re: [PATCH 2/3] libxl/remus: Move the assert before the info is used. [and 1 more messages] Date: Mon, 1 Feb 2016 14:14:09 +0000 Message-ID: <22191.26673.11853.853490@mariner.uk.xensource.com> References: <1453843860-29591-1-git-send-email-konrad.wilk@oracle.com> <1453843860-29591-4-git-send-email-konrad.wilk@oracle.com> <20160201121353.GU25660@citrix.com> <1453756017-8747-1-git-send-email-konrad.wilk@oracle.com> <1453756017-8747-3-git-send-email-konrad.wilk@oracle.com> <1453825288.25257.32.camel@citrix.com> <22183.40348.100035.362423@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQFF8-0005Jr-6S for xen-devel@lists.xenproject.org; Mon, 01 Feb 2016 14:14:14 +0000 In-Reply-To: <22183.40348.100035.362423@mariner.uk.xensource.com>, <20160201121353.GU25660@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Ian Campbell , Wen Congyang , Ian.Jackson@eu.citrix.com, xen-devel@lists.xenproject.org, Yang Hongyang List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("Re: [PATCH 3/4] libxl/remus: Change the assert for info to an return"): > On Tue, Jan 26, 2016 at 04:30:59PM -0500, Konrad Rzeszutek Wilk wrote: > > The assert(info) is after quite a lot of manipulations > > on 'info' - which makes the assert pointless because if > > info was NULL it would have crashed earlier. > > This sounds sensible. I don't think I agree. As I wrote in response to a previous version: Ian Jackson writes ("Re: [PATCH 2/3] libxl/remus: Move the assert before the info is used."): > I think the assert should simply be removed. We don't assert() other > pointer parameters for non-NULL-ness. > > Certainly turning null pointer bugs into ERROR_INVALID is very > unfriendly. Ian.