提交 8aa9cf7e 编写于 作者: R Richard Levitte

Add a warning stipulating how things should be coded in ossl_init_base

Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1922)
上级 b7a7f39a
......@@ -79,6 +79,13 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base)
if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL)
return 0;
OPENSSL_cpuid_setup();
/*
* BIG FAT WARNING!
* Everything needed to be initialized in this function before threads
* come along MUST happen before base_inited is set to 1, or we will
* see race conditions.
*/
base_inited = 1;
#if !defined(OPENSSL_NO_DSO) && !defined(OPENSSL_USE_NODELETE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册