Skip to Content.
Sympa Menu

freetds - [freetds] clang static analysis

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] clang static analysis
  • Date: Thu, 3 May 2012 18:36:34 -0400

http://www.freetds.org/scan-build/

The above analysis was produced by the Clang "static-build" tool based
on a recent version of the development branch. A spot-check shows
several false positives but some bona fide errors e.g.

http://www.freetds.org/scan-build/report-06549p.html#EndPath

There are 206 potential errors indicated. If you would like to
contribute to the project, it would be very helpful simply to sort
those 206 into two kinds:

1. errors
2. non-errors

If several people do this, we will have good feedback for both the
FreeTDS and Clang projects. In the case of Clang, perhaps we can
classify the non-errors. For instance, I noticed that variables
initialized as a function output parameter isn't recognized as
initialization, and a pointer is detected as NULL after being tested
with assert(3) (although arguably the assert is insufficient).

Patches are also welcome, of course. :-)

FreeTDS is an interesting test case for the Clang static analyzer
by virtue of its portability. Recent AIX issues notwithstanding,
FreeTDS is highly portable and conscientious about standards. The
project has tens of thousands of users, and has held stable at ~100,000
lines of code for several years. Yet static analysis continues to turn
up potential errors.

--jkl



  • [freetds] clang static analysis, James K. Lowden, 05/03/2012

Archive powered by MHonArc 2.6.24.

Top of Page