Errors seen in LOGS/python-ZODB3-3.10.5-2.fc17

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

Raw build logs can be seen here

Unclassified errors

The triager didn't know how to classify these ones

src/BTrees/BucketTemplate.c bucket_repr returning pointer to deallocated memory

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.

src/BTrees/BucketTemplate.c _bucket_set ob_refcnt of '*keyarg' is 1 too low
src/BTrees/BTreeModuleTemplate.c PyVar_Assign ob_refcnt of '*e' is 1 too low
src/BTrees/BTreeModuleTemplate.c PreviousBucket ob_refcnt of '*trailing' is 1 too low
src/BTrees/BucketTemplate.c bucket_repr 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

src/BTrees/BTreeTemplate.c BTree_getstate ob_refcnt of '*r.255' is 1 too high
src/BTrees/BTreeTemplate.c BTree_getstate ob_refcnt of new ref from call to Py_BuildValue is 1 too high
src/BTrees/BucketTemplate.c bucket_byValue ob_refcnt of '*item.294' is 1 too high
src/BTrees/BucketTemplate.c bucket_byValue ob_refcnt of new ref from call to PyObject_CallObject is 1 too high
src/BTrees/BucketTemplate.c bucket_byValue ob_refcnt of new ref from call to PyObject_GetAttr is 1 too high
src/BTrees/SetTemplate.c set_repr ob_refcnt of '*t' is 1 too high
src/BTrees/BTreeTemplate.c BTree_byValue ob_refcnt of '*item.245' is 1 too high
src/BTrees/BTreeTemplate.c BTree_byValue ob_refcnt of new ref from call to PyObject_CallObject is 1 too high
src/BTrees/BTreeTemplate.c BTree_byValue ob_refcnt of new ref from call to PyObject_GetAttr is 1 too high
src/BTrees/BucketTemplate.c bucket_split ob_refcnt of '*next' is 1 too high

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

src/BTrees/BTreeItemsTemplate.c BTreeItems_seek ob_refcnt of new ref from (unknown) IndexError is 1 too high
src/BTrees/MergeTemplate.c bucket_merge ob_refcnt of new ref from (unknown) merge_error is 1 too high
src/BTrees/SetTemplate.c set_repr ob_refcnt of new ref from (unknown) PyString_Format is 1 too high
src/BTrees/BTreeTemplate.c BTree__p_resolveConflict ob_refcnt of new ref from (unknown) get_bucket_state is 1 too high
src/BTrees/BTreeTemplate.c BTree__p_resolveConflict ob_refcnt of '*x.89' is 1 too high
src/BTrees/BTreeTemplate.c BTree__p_resolveConflict ob_refcnt of '*x.90' is 1 too high
src/BTrees/SetTemplate.c set_item ob_refcnt of new ref from (unknown) IndexError is 1 too high
src/BTrees/BTreeTemplate.c BTree_byValue ob_refcnt of new ref from (unknown) BTree_rangeSearch 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
src/BTrees/BTreeTemplate.c BTree_setstate returning (PyObject*)NULL without setting an exception
src/BTrees/SetTemplate.c Set_update returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree__p_deactivate returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c Bucket_maxminKey returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_setstate returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_setdefault returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c _BTree_get returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_addUnique returning (PyObject*)NULL without setting an exception
src/BTrees/SetTemplate.c Set_remove returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_setdefault returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c Mapping_update returning (PyObject*)NULL without setting an exception
src/BTrees/TreeSetTemplate.c TreeSet_setstate returning (PyObject*)NULL without setting an exception
src/BTrees/TreeSetTemplate.c TreeSet_insert returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_clear returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_pop returning (PyObject*)NULL without setting an exception
src/BTrees/MergeTemplate.c bucket_merge returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_check returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_byValue returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeItemsTemplate.c BTreeItems_slice returning (PyObject*)NULL without setting an exception
src/BTrees/SetTemplate.c set_setstate returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_items returning (PyObject*)NULL without setting an exception
src/BTrees/SetOpTemplate.c set_operation returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_rangeSearch returning (PyObject*)NULL without setting an exception
src/BTrees/TreeSetTemplate.c TreeSet_update returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket_pop returning (PyObject*)NULL without setting an exception
src/BTrees/SetTemplate.c set_item returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_byValue returning (PyObject*)NULL without setting an exception
src/BTrees/TreeSetTemplate.c TreeSet_remove returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeItemsTemplate.c BTreeItems_item returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_maxminKey returning (PyObject*)NULL without setting an exception
src/BTrees/SetTemplate.c Set_insert returning (PyObject*)NULL without setting an exception
src/BTrees/BTreeTemplate.c BTree_clear returning (PyObject*)NULL without setting an exception
src/BTrees/BucketTemplate.c bucket__p_deactivate returning (PyObject*)NULL without setting an exception