The manual says this in its notes:
... and therefore applications using static linking should also call
OPENSSL_thread_stop() on each thread. ...
Fixes #8171
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/8173)
static DWORD WINAPI thread_run(LPVOID arg)
{
run_multi_thread_test();
+ /*
+ * Because we're linking with a static library, we must stop each
+ * thread explicitly, or so says OPENSSL_thread_stop(3)
+ */
+ OPENSSL_thread_stop();
return 0;
}
static void *thread_run(void *arg)
{
run_multi_thread_test();
+ /*
+ * Because we're linking with a static library, we must stop each
+ * thread explicitly, or so says OPENSSL_thread_stop(3)
+ */
+ OPENSSL_thread_stop();
return NULL;
}