From: Eugene Syromiatnikov Date: Mon, 1 Sep 2025 12:38:10 +0000 (+0200) Subject: test/radix/quic_bindings.c: move locking after child_script_info assignment X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=146889381ab353a8769f85288f45cc3580ffc50f;p=thirdparty%2Fopenssl.git test/radix/quic_bindings.c: move locking after child_script_info assignment Coverity complains that some child_script_info field accesses are guarded by the mutexes, while others are not; placate it by performing the assignment before taking the lock. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665151 References: https://github.com/openssl/project/issues/1362 Signed-off-by: Eugene Syromiatnikov Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28405) --- diff --git a/test/radix/quic_bindings.c b/test/radix/quic_bindings.c index b63e0d4fb14..1a9790df15c 100644 --- a/test/radix/quic_bindings.c +++ b/test/radix/quic_bindings.c @@ -799,9 +799,9 @@ DEF_FUNC(hf_spawn_thread) if (!TEST_ptr(child_rt->debug_bio = BIO_new(BIO_s_mem()))) goto err; - ossl_crypto_mutex_lock(child_rt->m); - child_rt->child_script_info = script_info; + + ossl_crypto_mutex_lock(child_rt->m); if (!TEST_ptr(child_rt->t = ossl_crypto_thread_native_start(RADIX_THREAD_worker_main, child_rt, 1))) { ossl_crypto_mutex_unlock(child_rt->m);