All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Muli Ben-Yehuda <mulix@mulix.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [patch] Lets not put statements with side-effects inside BUG_ON()
Date: Thu, 27 Oct 2005 19:06:22 +0200	[thread overview]
Message-ID: <20051027170622.GA12502@devserv.devel.redhat.com> (raw)
In-Reply-To: <20051027170401.GM31028@granada.merseine.nu>

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

  reply	other threads:[~2005-10-27 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27 10:29 [patch] Lets not put statements with side-effects inside BUG_ON() Arjan van de Ven
2005-10-27 17:04 ` Muli Ben-Yehuda
2005-10-27 17:06   ` Arjan van de Ven [this message]
2005-10-27 17:49 ` Kip Macy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051027170622.GA12502@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=mulix@mulix.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.