Errors seen in LOGS/pyxattr-0.5.0-4.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

xattr.c get_all ob_refcnt of '*mylist' is 1 too high

Reference leak within initialization

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

xattr.c initxattr ob_refcnt of PyStringObject 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)

xattr.c xattr_list dereferencing NULL (MEM[(struct PyListObject *)res].ob_item) at xattr.c:942
xattr.c get_all dereferencing NULL (my_tuple->ob_refcnt) at xattr.c:467
xattr.c pylistxattr dereferencing NULL (MEM[(struct PyListObject *)mylist].ob_item) at xattr.c:846

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
xattr.c pygetxattr returning (PyObject*)NULL without setting an exception
xattr.c xattr_get returning (PyObject*)NULL without setting an exception
xattr.c pysetxattr returning (PyObject*)NULL without setting an exception
xattr.c xattr_set returning (PyObject*)NULL without setting an exception
xattr.c xattr_remove returning (PyObject*)NULL without setting an exception
xattr.c pyremovexattr returning (PyObject*)NULL without setting an exception