Errors seen in LOGS/pyaudio-0.2.3-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 leaks

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

_portaudiomodule.c pa_stop_stream ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_device_count ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_is_stream_stopped ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_default_host_api ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_host_api_count ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_write_stream ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_host_api_device_index_to_device_index ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c _pyAudio_Stream_get_structVersion ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_default_input_device ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_is_stream_active ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_default_output_device ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_stream_read_available ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_device_info ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_abort_stream ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_sample_size ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_is_format_supported ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_initialize ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_start_stream ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_host_api_info ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_read_stream ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_get_stream_write_available ob_refcnt of new ref from call to Py_BuildValue is 1 too high
_portaudiomodule.c pa_host_api_type_id_to_host_api_index ob_refcnt of new ref from call to Py_BuildValue 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)

_portaudiomodule.c pa_get_device_info dereferencing NULL (py_info->devInfo) at _portaudiomodule.c:1466
_portaudiomodule.c pa_get_host_api_info dereferencing NULL (py_info->apiInfo) at _portaudiomodule.c:1352
_portaudiomodule.c pa_read_stream calling PyString_AsString with NULL as argument 1 (rv) at _portaudiomodule.c:2242

Implementation notes for gcc-with-cpychecker

The following "Py" functions were used but aren't yet explicitly handled by gcc-with-cpychecker