From: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: btrfs-progs: initial scan-build results
Date: Tue, 1 Mar 2016 13:44:03 +0100 [thread overview]
Message-ID: <56D58E93.9000705@googlemail.com> (raw)
Hi,
With btrfs-progs needing & getting some more love I decided to run today's
master through clang's very awesome static analyzer [1] to see what a more
complete data flow analysis than gcc's -Wall yields. The results can be
found at [2] and are somewhat reason for concern. =:)
Please note that even though all messages are typically "real" in the sense
that they _could_ happen, it does not mean that they do during normal
operation, since some codepaths might just be dynamic/rare. That being said,
quite a few warnings seemed sufficiently serious to me that I decided to post
this. For example there's IMHO no sane way zero-sized allocations make any
sense.
IMHO most dead stores are seemingly the easiest to fix (just remove the
statement?), but some of them might actually be missing upstream error
handling - indicative of something more serious.
Dave, any suggestions on how best to proceed? Any preferences or would
another branch be more interesting? I tried to track devel but that
gets rebased frequently (or I'm doing something wrong).
Btw running scan-build is easy: get clang, './configure' as usual and
'scan-build make -jX' will create the report in /tmp/scan-build-<time>.
Let me know if this is helpful.
cheers,
Holger
[1] http://clang-analyzer.llvm.org/scan-build.html
[2] http://hoho.duckdns.org/~holger/btrfs-progs/scan-build-2016-03-01-130244-29106-1/
next reply other threads:[~2016-03-01 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 12:44 Holger Hoffstätte [this message]
2016-03-01 13:41 ` btrfs-progs: initial scan-build results Alexander Fougner
2016-03-01 15:45 ` Holger Hoffstätte
2016-03-01 16:39 ` Holger Hoffstätte
2016-03-02 15:04 ` David Sterba
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=56D58E93.9000705@googlemail.com \
--to=holger.hoffstaette@googlemail.com \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).