]> 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>
Wed, 24 Sep 2025 14:21:03 +0000 (10:21 -0400)
For unknown reasons using RW mutexes on RISC-V arch
seems to be broken, at least with glibc.

Fixes #28550

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

crypto/threads_pthread.c

index b004dd5392705f91f0f8adb8293688daac3362c7..52ae4f8cfd55b190339a9fa66583fba728386bf9 100644 (file)
 /*
  * 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