Hello David,
We have released psycopg 2.4.5
<
http://initd.org/psycopg/articles/2012/03/29/psycopg-245-released/>
which, apart from a few bug fixes reported by the users, has had the
entire code base cleaned up using the static checker.
I haven't managed to run it without false positive, which was probably
too high as a target. Some reference counts are not going to be set to
zero, just because they are not: it is the case of static variables,
for instance we use the python string "NULL" over and over in the
library so we just keep a reference to it.
Anyway, the checker has allowed me to clean up 47 distinct occurrences
of missing checks for errors on return values (thus likely to segfault
downstream due to null dereferencing), 14 refcount errors (mostly
related to global objects initializations, so not live memory leak)
and four wrong function arguments check, three of which exposed to
python and leading to a segfault if the wrong object was used. I'm
happy it hasn't found any major disaster, our codebase wasn't that
bad, but it's great it has made the module more robust in the face of
the unexpected (that is, in case of memory error it won't be our
module to segfault hiding the real cause of the memory error).
So, thank you very much for the tool and the assistance in using it.
I'll look forward to try and contribute something else to your
project.
-- Daniele