[openssl/openssl] d053fe: convert CRYPTO_THREAD_run_once to use InitOnceExec...
"'Neil Horman' via openssl-commits" <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.cvs |
|---|---|
| Message-ID | <openssl/openssl/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/openssl/openssl
Commit: d053fe41a4add4e55dc5633e8aef6602a6a4b90b
https://github.com/openssl/openssl/commit/d053fe41a4add4e55dc5633e8aef6602a6a4b90b
Author: Neil Horman <[email protected]>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
M crypto/threads_win.c
M include/internal/e_os.h
M include/openssl/crypto.h.in
M include/openssl/e_os2.h
M providers/implementations/rands/seeding/rand_win.c
M ssl/rio/rio_notifier.c
M util/platform_symbols/windows-symbols.txt
Log Message:
-----------
convert CRYPTO_THREAD_run_once to use InitOnceExecuteOnce api
Issue #22059 reported a race condition in CRYPTO_THREAD_run_once on
windows platforms. The most correct fix for this is to convert the
windows run_once implementation to use the Win32 InitOnceRunOnce
interface. Doing so requires at least Windows Vista/Windows Server 2008
to be available, and because WinXP hasn't built since 3.0 released, it
seems sensible to bump our minimal NT version to be 0x600 (Vista/2008)
Also, while we're at it, this change caught a bad programming practice
in the rio_notifier code, which attempts to reset the once variable
during shutdown. The windows static initalizer macro for this api is
constructed such that attempting to do so causes a build break. Since
once variables are not meant to be reset (since they are only triggered
once), remove that reset code to avoid the breakage.
Note that this problem was independently found and fixed in #30198.
We're taking the fix from this pr (as they are effectively identical),
and using that PR to add some much needed tests to the rio code.
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Bob Beck <[email protected]>
MergeDate: Wed Jun 10 19:44:19 2026
(Merged from https://github.com/openssl/openssl/pull/31339)
To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
--
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/38e158-d053fe%40github.com.