All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Jeff Merkey <linux.mdb@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [BUG REPORT] use of unreachable() masks uninitialized variables warnings
Date: Thu, 11 Feb 2016 21:41:40 -0500	[thread overview]
Message-ID: <20160212024140.GB11298@thunk.org> (raw)
In-Reply-To: <CAO6TR8UJiaUha0PW-pHcjkYddCf5W2D0Cqewx28EuRO8w3-EmQ@mail.gmail.com>

On Thu, Feb 11, 2016 at 11:12:12AM -0700, Jeff Merkey wrote:
> 
> That's good to know, they could be false positives, but it was kind of
> wierd behavior caused by that macro.

If it is true, it sounds more like a compiler bug to me.  Any
statements a BUG() call are unreachable.  If the compiler assumes that
in the case of:

	if (a)
	        BUG();
	printf("foo bar\n");
	
That the printf is not reachable, that's a compiler bug.  And not a
problem in the BUG() macro.

It might be that it's worthwhile to use other static code analysis
tools.  Many people will look at warnings from Coverity and clang to
find potential problems, since these tend to find more warnings than
just using gcc.  The problem with some of these, including Coverity,
is that they can be __too__ noisy, and if 90% of the warnings are
false positives, most people won't take the time to weed out several
dozen bogus warnings to find the one good one.

In your case, for example, I looked through several dozen warnings,
and they were ***all*** bogus.  Keep in mind that this might make me
less inclined to pay attention to complaints from you in the future.
The story of the buy who cried wolf too often comes to mind.

Perhaps you could actually take a close look at the warnings, before
you fire off an e-mail?  If at least one of the warnings were valid
and pointed at an actual bug, it wouldn't have been a complete waste
of my time....

Best regards,

						- Ted

  reply	other threads:[~2016-02-12  2:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11  3:13 [BUG REPORT] use of unreachable() masks uninitialized variables warnings Jeff Merkey
2016-02-11 14:06 ` Theodore Ts'o
2016-02-11 18:12   ` Jeff Merkey
2016-02-12  2:41     ` Theodore Ts'o [this message]
2016-02-12  4:18       ` Jeff Merkey
2016-02-12  4:28       ` Jeff Merkey
2016-02-12  4:41         ` Jeff Merkey
2016-02-12  4:58       ` Jeff Merkey

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=20160212024140.GB11298@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.mdb@gmail.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.