From: Bernd Edlinger Date: Fri, 19 Sep 2025 06:52:24 +0000 (+0200) Subject: Do not use RW mutexes on RISC-V arch X-Git-Tag: openssl-3.2.6~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51992d03f4f3c2825701dce7724285d7c26be119;p=thirdparty%2Fopenssl.git Do not use RW mutexes on RISC-V arch For unknown reasons using RW mutexes on RISC-V arch seems to be broken, at least with glibc. Fixes #28550 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28635) (cherry picked from commit 728d5cf9e1b1bed196b31e8c71b8e1d2e398d2ff) --- diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index 8d85120eced..b54772ad669 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -41,8 +41,10 @@ /* * 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