summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Edlinger <[email protected]>2025-09-19 08:52:24 +0200
committerNeil Horman <[email protected]>2025-09-23 19:05:31 +0200
commit39960bb02bcb6ed19436e926600fc8bc2ae364cc (patch)
tree7955561cbcc3cc0b1429218892790d010b9e8ee5
parentx509: fix mem leak on error path (diff)
downloadopenssl-39960bb02bcb6ed19436e926600fc8bc2ae364cc.tar.gz
openssl-39960bb02bcb6ed19436e926600fc8bc2ae364cc.zip
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: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28634) (cherry picked from commit bea53924ce729353df41129c58bd3349df7d7a82)
-rw-r--r--crypto/threads_pthread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c
index f357c9f71f0..40ad3ae9c1e 100644
--- a/crypto/threads_pthread.c
+++ b/crypto/threads_pthread.c
@@ -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