summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-03-08 11:58:07 -0500
committerPauli <ppzgs1@gmail.com>2024-04-24 12:03:03 +1000
commit7e45ac6891ade57cb0141402745d144c4ce342cb (patch)
tree674f533e5a639320afa6e15cd847c6818b5ef0e6 /util
parentf39a86281883bd7ff0b3791ed203756d055c001b (diff)
Add CRYPTO_atomic_store api
Generally we can get away with just using CRYPTO_atomic_load to do stores by reversing the source and target variables, but doing so creates a problem for the thread sanitizer as CRYPTO_atomic_load hard codes an __ATOMIC_ACQUIRE constraint, which confuses tsan into thinking that loads and stores aren't properly ordered, leading to RAW/WAR hazzards getting reported. Instead create a CRYPTO_atomic_store api that is identical to the load variant, save for the fact that the value is a unit64_t rather than a pointer that gets stored using an __ATOMIC_RELEASE constraint, satisfying tsan. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23671)
Diffstat (limited to 'util')
-rw-r--r--util/libcrypto.num1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 75813690dc..0c83e9598e 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -5548,3 +5548,4 @@ X509_STORE_get1_objects 5675 3_3_0 EXIST::FUNCTION:
OPENSSL_LH_set_thunks 5676 3_3_0 EXIST::FUNCTION:
OPENSSL_LH_doall_arg_thunk 5677 3_3_0 EXIST::FUNCTION:
OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines 5678 3_3_0 EXIST::FUNCTION:HTTP
+CRYPTO_atomic_store ? 3_4_0 EXIST::FUNCTION: