[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.