diff options
author | Richard Levitte <levitte@openssl.org> | 2019-02-06 20:51:47 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-02-07 20:15:21 +0100 |
commit | 03cdfe1efaf2a3b5192b8cb3ef331939af7bfeb8 (patch) | |
tree | d436357297561593a5ff59d35b8935082bd5a560 /test | |
parent | Make OPENSSL_malloc_init() a no-op (diff) | |
download | openssl-03cdfe1efaf2a3b5192b8cb3ef331939af7bfeb8.tar.xz openssl-03cdfe1efaf2a3b5192b8cb3ef331939af7bfeb8.zip |
test/drbgtest.c: call OPENSSL_thread_stop() explicitly
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)
Diffstat (limited to 'test')
-rw-r--r-- | test/drbgtest.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/drbgtest.c b/test/drbgtest.c index 4546f63376..c788f19fc5 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -839,6 +839,11 @@ typedef HANDLE thread_t; 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; } @@ -860,6 +865,11 @@ typedef pthread_t thread_t; 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; } |