Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: clang static analyzer

From: Nicolas Pitre <nico@fluxnic.net>
Date: 2016-06-15 22:47:50

On Sun, 6 Dec 2009, Jeff King wrote:
On Sun, Dec 06, 2009 at 07:11:24AM +0100, Tomas Carnecky wrote:
quoted
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.
I'm a bit skeptical here.  Going down that route might mean that we'll 
eventually have to add all sort of crap to accommodate everyone's 
preferred static analysis tool of the day.  Would be far nicer to try to 
make those tools more intelligent instead, or at least make them 
understand an out-of-line annotation format that does not clutter the 
code itself.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help