From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] BUG() disassembly tweak
Date: Sat, 11 May 2002 13:42:39 +0200 [thread overview]
Message-ID: <20020511134239.F635@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <Pine.LNX.4.21.0205102216160.3747-100000@localhost.localdomain> <Pine.LNX.4.33.0205101457120.22516-100000@penguin.transmeta.com> <20020511005115.N5262@suse.de>
On Sat, May 11, 2002 at 12:51:15AM +0200, Dave Jones wrote:
> On Fri, May 10, 2002 at 03:10:04PM -0700, Linus Torvalds wrote:
> > If it wants to be changed, I'd actually personally prefer it to be changed
> > to take an explicit string instead of using the filename/linenr at all.
[...]
> Failing that, resurrecting the k_assert() idea someone proposed
> (jgarzik?) a few months back.
Oh? I remember many people having objections against assert.
Personally I like BUG_ON() as is and it helped me already
catching a lot of bugs in my own code and removed the need for
several conditions and cleanup code for situation, that happen only
with wrong arguments/corruption and are bugs instead of user
stupidity.
BUG() is usally used, when we need to print much more information
about the error (like dumping some variables, which have wrong
values). In these cases a BUG_PRINTK() would be much more
useful, since most users of BUG() use printk before and only want
to save cleanup code for "impossible" conditions.
Or at least have a variant of BUG(), which has only triggers the
code path aborting, without printing filename/line_no (because
our own debug statements did this already).
Regards
Ingo Oeser
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
next prev parent reply other threads:[~2002-05-11 11:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 21:22 Hugh Dickins
2002-05-10 22:10 ` Linus Torvalds
2002-05-10 22:51 ` Dave Jones
2002-05-11 11:42 ` Ingo Oeser [this message]
2002-05-10 22:58 ` Andrew Morton
2002-05-11 0:00 ` Keith Owens
2002-05-11 1:58 ` Hugh Dickins
2002-05-11 2:32 ` Kai Germaschewski
2002-05-11 3:03 ` Keith Owens
2002-05-11 1:04 ` Hugh Dickins
2002-05-11 1:34 ` Keith Owens
2002-05-11 1:39 ` Keith Owens
2002-05-11 2:07 ` Hugh Dickins
2002-05-11 2:21 ` Keith Owens
2002-05-13 15:31 ` Hugh Dickins
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=20020511134239.F635@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®