Talk:Library Initialization

From OpenSSLWiki
Revision as of 14:30, 7 May 2015 by Matt (talk | contribs) (Raise CRYPTO_cleanup_ex_data() issue)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

You said: "CRYPTO_cleanup_all_ex_data and ERR_remove_state should be called on each thread, and not just the main thread."

However the FAQ says:

"Brutal" (thread-unsafe) Application-global cleanup functions:

  ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().'

And the code comments for CRYPTO_cleanup_all_ex_data() say:

/* Release all "ex_data" state to prevent memory leaks. This can't be made
 * thread-safe without overhauling a lot of stuff, and shouldn't really be
 * called under potential race-conditions anyway (it's for program shutdown
 * after all). */

So I don't think its right to say CRYPTO_cleanup_all_ex_data() should be called on each thread. --Matt (talk) 14:30, 7 May 2015 (UTC)