]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix OSSL_ATOMICS_LOCKLESS detection for Windows toolchains
authorBob Beck <beck@openssl.org>
Thu, 18 Jun 2026 18:02:06 +0000 (12:02 -0600)
committerEugene Syromiatnikov <esyr@openssl.org>
Mon, 22 Jun 2026 07:14:04 +0000 (09:14 +0200)
The check referenced USE_INTERLOCKEDOR64, but the macro defined above
for MSVC (with the right architecture/version) and 64-bit MinGW is
OSSL_USE_INTERLOCKEDOR64.  As a result, OSSL_ATOMICS_LOCKLESS was
never defined on Windows, even though those toolchains do provide
lockless atomics.

Reported-by: Mounir IDRASSI <mounir.idrassi@idrix.fr>
Fixes: 26c57423933c "Use the actually correct define for solaris and gcc"
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Mon Jun 22 07:22:31 2026
(Merged from https://github.com/openssl/openssl/pull/31600)

include/internal/threads_common.h

index b6dea47ab98bf006652316940cea03e077c18a8b..e32257d63018b241a342fb2490ac38f24ca10973 100644 (file)
@@ -88,7 +88,7 @@ void CRYPTO_THREAD_clean_local(void);
 #endif
 
 /* Allow us to know if atomics will be implemented with a fallback lock or not. */
-#if defined(OSSL_USE_GCC_ATOMICS) || defined(OSSL_USE_SOLARIS_ATOMICS) || defined(USE_INTERLOCKEDOR64)
+#if defined(OSSL_USE_GCC_ATOMICS) || defined(OSSL_USE_SOLARIS_ATOMICS) || defined(OSSL_USE_INTERLOCKEDOR64)
 #define OSSL_ATOMICS_LOCKLESS
 #endif