]> 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:33:02 +0000 (10:33 -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)

(cherry picked from commit 728d5cf9e1b1bed196b31e8c71b8e1d2e398d2ff)

crypto/threads_pthread.c

index 8d85120eced7b67f7205b477a8ace8194481f190..b54772ad66989b8611a9209468b96807f52393a3 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