Errors seen in LOGS/python-meld3-0.6.7-5.fc17

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.

meld3/cmeld3.c findmeld ob_refcnt of return value is 1 too low
meld3/cmeld3.c getiterator ob_refcnt of return value is 1 too low
meld3/cmeld3.c bfclone ob_refcnt of return value is 1 too low
meld3/cmeld3.c contenthandler ob_refcnt of heap-region-6 is 1 too low
meld3/cmeld3.c contenthandler ob_refcnt of heap-region-10 is 1 too low

Reference leaks

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

meld3/cmeld3.c bfclonehandler ob_refcnt of '*pchildren' is 1 too high
meld3/cmeld3.c getiterator ob_refcnt of '*node' is 1 too high
meld3/cmeld3.c getiterator ob_refcnt of '*children' is 1 too high
meld3/cmeld3.c bfclone ob_refcnt of '*L' is 1 too high
meld3/cmeld3.c getiteratorhandler ob_refcnt of '*list' 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)

meld3/cmeld3.c findmeld calling PyList_Size with NULL as argument 1 (children) at meld3/cmeld3.c:277

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

meld3/cmeld3.c bfclonehandler ob_refcnt of new ref from (unknown) bfclone is 1 too high
meld3/cmeld3.c bfclonehandler ob_refcnt of '*element' is 1 too high
meld3/cmeld3.c getiterator ob_refcnt of new ref from (unknown) getiterator is 1 too high
meld3/cmeld3.c bfclone ob_refcnt of new ref from (unknown) bfclone is 1 too high
meld3/cmeld3.c contenthandler ob_refcnt of '*replacenode' 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
meld3/cmeld3.c bfclonehandler returning (PyObject*)NULL without setting an exception
meld3/cmeld3.c getiterator returning (PyObject*)NULL without setting an exception
meld3/cmeld3.c bfclone returning (PyObject*)NULL without setting an exception