Errors seen in LOGS/Io-language-20080330-8.fc17.2

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

Raw build logs can be seen here

Reference count too low

Code paths in which the reference count of an object is left too low. This could lead to the object being deallocated too early, triggering segfaults when later accessed. Over repeated calls, these errors could accumulate, increasing the likelihood of a segfault.

source/IoPython.c wrap ob_refcnt of '*o' is 1 too low

Reference leaks

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

source/IoPython.c IoPython_import ob_refcnt of '*pName' is 1 too high
source/IoPython.c convertIo ob_refcnt of return value is 1 too high
source/IoPython.c IoPython_call_int ob_refcnt of '*pValue' is 1 too high

Segfaults within error-handling paths

Code paths in error-handling that will lead to a segmentatation fault (e.g. under low memory conditions)

source/IoPython.c IoPython_import dereferencing NULL (pName->ob_refcnt) at source/IoPython.c:265
source/IoPython.c convertIo dereferencing NULL (ret->ob_refcnt) at source/IoPython.c:103
source/IoPython.c convertIo dereferencing NULL (ret->ob_refcnt) at source/IoPython.c:108

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

source/IoPython.c IoPython_import ob_refcnt of '*pModule' is 1 too high
source/IoPython.c IoPython_call_int ob_refcnt of '*pyValue' is 1 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
source/IoPython.c convertIo returning (PyObject*)NULL without setting an exception