linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs-progs: initial scan-build results
@ 2016-03-01 12:44 Holger Hoffstätte
  2016-03-01 13:41 ` Alexander Fougner
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Hoffstätte @ 2016-03-01 12:44 UTC (permalink / raw)
  To: linux-btrfs

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-02 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 12:44 btrfs-progs: initial scan-build results Holger Hoffstätte
2016-03-01 13:41 ` 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

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