Errors seen in LOGS/python-bitarray-0.3.5-4.fc15

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

Raw build logs can be seen here

Segfaults in normal paths

Code paths that will lead to a segmentatation fault

bitarray/_bitarray.c bitarray_and dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1756

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.

bitarray/_bitarray.c btree_traverse ob_refcnt of return value is 1 too low

Reference leaks

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

bitarray/_bitarray.c bitarray_decode ob_refcnt of '*res' 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)

bitarray/_bitarray.c bitarray_or dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1757
bitarray/_bitarray.c bitarray_xor dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1758
bitarray/_bitarray.c bitarray_mul dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1708
bitarray/_bitarray.c bitarray_decode calling PyList_Append with NULL as argument 1 (res) at bitarray/_bitarray.c:1860
bitarray/_bitarray.c bitarray_decode dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1857
bitarray/_bitarray.c bitarray_add dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1678
bitarray/_bitarray.c bitarray_buffer_info dereferencing NULL (ptr->ob_refcnt) at bitarray/_bitarray.c:925

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

bitarray/_bitarray.c bitarray_decode ob_refcnt of '*symbol' is 1 too high
bitarray/_bitarray.c newbitarrayobject ob_refcnt of '*obj' 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
bitarray/_bitarray.c bitarray_extend returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_setitem returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_or returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_pop returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_imul returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_xor returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_mul returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_encode returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_ior returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c btree_traverse returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_and returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_new returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_add returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_iadd returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_ixor returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c newbitarrayobject returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c richcompare returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_delitem returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_pack returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_fromstring returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_remove returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_iand returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_insert returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_fromfile returning (PyObject*)NULL without setting an exception
bitarray/_bitarray.c bitarray_append returning (PyObject*)NULL without setting an exception