git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: clang static analyzer

From
Jeff King <peff@peff.net>
Date
Dec 6, 2009, 14:57 UTC
Message-ID
<20091206145744.GA6725@coredump.intra.peff.net>
In-Reply-To
<33ABC714-2BCC-4910-BCAE-D331AAF2A724@dbservice.com>
On Sun, Dec 06, 2009 at 07:11:24AM +0100, Tomas Carnecky wrote:
Show 6 quoted lines
> Clang again found many dead assignments/increments, but in the earlier
> discussions you concluded that you want to keep those around. So I
> focussed on another class of potential bugs: Argument with 'nonnull'
> attribute passed null. There were a total of seven such issues. I then
> tried to look through the code and see if they are valid or false
> positives:

Thanks, I think you are moving in the right direction to manually investigate the output of clang, since it obviously does generate some false positives.

I think the next step for each site you found would be:
  1. If it really is a problem, then it should be easy to show a simple
     case that can trigger the issue. Submit a patch fixing that site,
     either describing the test case in the commit message, or adding a
     case to the test suite.
  2. If it is a false positive, see what it would take to silence clang
     and submit a patch.  I don't think we are opposed to annotations
     that help analysis tools as long as those annotations aren't too
     intrusive or make the code less readable.
-Peff
Previous: Tomas CarneckyNext: Nicolas Pitre
Message 2 of 7 in “clang static analyzer”
  1. Tomas CarneckyDec 6, 2009
  2. Jeff KingDec 6, 2009
  3. Nicolas PitreDec 6, 2009
  4. Jeff KingDec 6, 2009
  5. Nicolas SebrechtDec 6, 2009
  6. Junio C HamanoDec 7, 2009
  7. Junio C HamanoDec 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.