4 messages in com.xensource.lists.xen-develRe: [Xen-devel] [patch] Lets not put ...
FromSent OnAttachments
Arjan van de Ven27 Oct 2005 03:28 
Muli Ben-Yehuda27 Oct 2005 10:03 
Arjan van de Ven27 Oct 2005 10:06 
Kip Macy27 Oct 2005 10:49 
Subject:Re: [Xen-devel] [patch] Lets not put statements with side-effects inside BUG_ON()
From:Arjan van de Ven (arj@redhat.com)
Date:10/27/2005 10:06:00 AM
List:com.xensource.lists.xen-devel

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 ;)