Errors seen in LOGS/py-radix-0.5-9.fc17

This is a summary of errors seen when compiling with an experimental static analysis tool

Raw build logs can be seen here

Reference leaks

Code paths in which the reference count of an object is left too high, leading to memory leaks

radix_python.c radix_getstate ob_refcnt of new ref from call to Py_BuildValue is 2 too high
radix_python.c radix_getstate ob_refcnt of new ref from call to Py_BuildValue is 1 too high

Reference count too low within an initialization routine

Code paths in which the reference count of an object is too low, but within an initialization routine, and thus likely to only happen once

radix_python.c initradix ob_refcnt of '*radix_constructor' is 1 too low

Possible reference leaks

Code paths in which the reference count of an object might too large - but in which the reference in question came from a function not known to the analyzer.

The analyzer assumes such references are new references, but if the function returns a borrowed reference instead, it's probably not a bug

radix_python.c Radix_reduce ob_refcnt of '*state' is 2 too high

Returning (PyObject*)NULL without setting an exception

These messages are often false-positives: the analysis tool has no knowledge about internal API calls that can lead to an exception being set
radix_python.c Radix_search_best returning (PyObject*)NULL without setting an exception
radix_python.c Radix_add returning (PyObject*)NULL without setting an exception
radix_python.c Radix_search_exact returning (PyObject*)NULL without setting an exception

Implementation notes for gcc-with-cpychecker

The following "Py" functions were used but aren't yet explicitly handled by gcc-with-cpychecker