[openssl-dev] memory leaks detected using libSSL 1.1
Michel
michel.sales at free.fr
Thu Feb 18 00:13:32 UTC 2016
Hi Matt,
Thanks for the suggestion.
This is what was printed to stderr :
OPENSSL_INIT: ossl_init_base: Setting up stop handlers
OPENSSL_INIT: ossl_init_add_all_ciphers: openssl_add_all_ciphers_internal()
OPENSSL_INIT: ossl_init_add_all_digests: openssl_add_all_digests_internal()
OPENSSL_INIT: ossl_init_ssl_base: Adding SSL ciphers and digests
OPENSSL_INIT: ossl_init_ssl_base: SSL_COMP_get_compression_methods()
OPENSSL_INIT: ossl_init_ssl_base: SSL_add_ssl_module()
OPENSSL_INIT: ossl_init_load_ssl_strings: ERR_load_SSL_strings()
OPENSSL_INIT: ossl_init_async: async_init()
OPENSSL_INIT: ossl_init_load_crypto_strings:
err_load_crypto_strings_intern()
OPENSSL_INIT: ossl_init_thread_start: marking thread for err_state
OPENSSL_INIT: ossl_init_thread_start: marking thread for err_state
OPENSSL_INIT: ossl_init_thread_stop: ERR_remove_thread_state(NULL)
OPENSSL_INIT: ssl_library_stop: SSL_COMP_free_compression_methods()
OPENSSL_INIT: ssl_library_stop: ERR_free_strings()
OPENSSL_INIT: OPENSSL_cleanup: ERR_free_strings()
OPENSSL_INIT: OPENSSL_INIT_library_stop: CRYPTO_cleanup_all_ex_data()
OPENSSL_INIT: OPENSSL_INIT_library_stop: EVP_cleanup()
OPENSSL_INIT: OPENSSL_INIT_library_stop: CONF_modules_free()
OPENSSL_INIT: OPENSSL_INIT_library_stop: RAND_cleanup()
Shouldn't there be at least another line with ERR_remove_thread_state() (one
for each thread) ?
This test program launch 1 server thread and 1 client thread.
Both of them have OPENSSL_thread_stop() in their [pre-]exit member function.
Michel.
-----Message d'origine-----
De : openssl-dev [mailto:openssl-dev-bounces at openssl.org] De la part de Matt
Caswell
Envoyé : mercredi 17 février 2016 17:23
À : openssl-dev at openssl.org
Objet : Re: [openssl-dev] memory leaks detected using libSSL 1.1
> Am I missing anything else ?
That should be sufficient (although the OPENSSL_cleanup() should not be
required).
You could try compiling OpenSSL with OPENSSL_INIT_DEBUG defined, e.g.
perl Configure your-platform-here -DOPENSSL_INIT_DEBUG
This should print out some debugging information to stderr every time the
init functions attempt to do something interesting. In particular when you
call OPENSSL_thread_stop() you should see the following printed
out:
OPENSSL_INIT: ossl_init_thread_stop: ERR_remove_thread_state(NULL)
Matt
More information about the openssl-dev
mailing list