WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] Lets not put statements with side-effects inside

To: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Subject: Re: [Xen-devel] [patch] Lets not put statements with side-effects inside BUG_ON()
From: Arjan van de Ven <arjanv@xxxxxxxxxx>
Date: Thu, 27 Oct 2005 19:06:22 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 28 Oct 2005 01:26:26 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051027170401.GM31028@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20051027102912.GB14158@xxxxxxxxxxxxxxxxxxxxxxxx> <20051027170401.GM31028@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Thu, Oct 27, 2005 at 07:04:01PM +0200, Muli Ben-Yehuda wrote:
> On Thu, Oct 27, 2005 at 12:29:12PM +0200, Arjan van de Ven wrote:
> 
> > BUG_ON() is a macro very very similar to assert(), and it's a really bad
> > idea in general to put statements with side-effects inside such a construct
> > (for example the BUG_ON() could be compiled away for non-debug builds).
> > 
> > The patch below fixes this for the drivers/xen tree.
> 
> I'd like to see this applied, to both Xen and the vanilla kernel;
> however, it should be noted that no version of Linux or Xen compiles
> BUG_ON() away without evaluating its arguments.

but it should be able to ;)

yeah I agree it's not a hard bug per se, but something that should be done
anyway ;)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel