Errors seen in LOGS/pyOpenSSL-0.12-2.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

OpenSSL/crypto/crypto.c global_passphrase_callback ob_refcnt of '*ret' is 1 too high

Reference count too low within an initialization routine

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

OpenSSL/crypto/crypto.c initcrypto ob_refcnt of '*crypto_Error.0' is 1 too low

Segfaults within error-handling paths

Code paths in error-handling that will lead to a segmentatation fault (e.g. under low memory conditions)

OpenSSL/crypto/crypto.c global_passphrase_callback dereferencing NULL (argv->ob_refcnt) at OpenSSL/crypto/crypto.c:49

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
OpenSSL/crypto/crypto.c crypto_dump_privatekey returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_dump_certificate returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_certificate returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_crl returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_verify returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_pkcs7_data returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_privatekey returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_dump_certificate_request returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_exception_from_error_queue returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_pkcs12 returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_sign returning (PyObject*)NULL without setting an exception
OpenSSL/crypto/crypto.c crypto_load_certificate_request returning (PyObject*)NULL without setting an exception

Implementation notes for gcc-with-cpychecker

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