]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Do not use RW mutexes on RISC-V arch
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 19 Sep 2025 06:52:24 +0000 (08:52 +0200)
committerNeil Horman <nhorman@openssl.org>
Tue, 23 Sep 2025 17:05:31 +0000 (13:05 -0400)
For unknown reasons using RW mutexes on RISC-V arch
seems to be broken, at least with glibc.

Fixes #28550

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28634)

(cherry picked from commit bea53924ce729353df41129c58bd3349df7d7a82)

crypto/threads_pthread.c

index f357c9f71f05e19eda55a4d939bdb1eb8a623142..40ad3ae9c1ef1be8744b24d79b0ab2d58514e6f3 100644 (file)
@@ -62,8 +62,10 @@ __tsan_mutex_post_lock((x), 0, 0)
 /*
  * The Non-Stop KLT thread model currently seems broken in its rwlock
  * implementation
+ * Likewise is there a problem with the glibc implementation on riscv.
  */
-# if defined(PTHREAD_RWLOCK_INITIALIZER) && !defined(_KLT_MODEL_)
+# if defined(PTHREAD_RWLOCK_INITIALIZER) && !defined(_KLT_MODEL_) \
+                                         && !defined(__riscv)
 #  define USE_RWLOCK
 # endif