On 23 Aug 2009, at 17:41, Greg Stark wrote:

On Sun, Aug 23, 2009 at 4:57 PM, Grzegorz Jaskiewicz<g...@pointblue.com.pl > wrote:
I am sure there's plenty of false positives, but I am also quite sure
there's many real errors on that list.

Do you know how to teach clang about functions which never return?
That seems to be causing most of the false positives because it
doesn't recognize that our error checks stop execution and avoid the
use of the unitialized variables afterwards.

I am not the clang developer, so I honestly have no idea how to do it. But as far as I checked report myself, there's couple 'division by zero', and 'null reference' errors that looked plausible to someone as unfamiliar with the postgresql's source as myself. Like with all static checkers, this one will generate a lot of false positives, and it is the inevitable cost of using such a tool having to go through all errors and sieve out positives yourself.

You probably refer to the functions that never return. Sadly, even tho llvm clang is capable of doing so (one of its strengths is linking optimization) - the checker is unable to cross reference files, or so it seems.

Well, like I said - l hope at least part of that report is useful.




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to