]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add one more trace message to the torture_rcu_high test
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 8 Sep 2025 21:00:55 +0000 (23:00 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 10 Sep 2025 20:36:05 +0000 (22:36 +0200)
commita09a68cef79bcf4f91da1b3b28410a4d317bfb94
tree1e48f177e4a4de1afe4cc63d2ef32776fd889004
parentf5fe2366af5a2758f88a13a08e86bd5db2a6c3e3
Add one more trace message to the torture_rcu_high test

It is interesting that in the very rare cases, where this
test failure has been observed so far, the rcu torture value
went always backwards to 0.  This could be either due to
ossl_rcu_deref(&writer_ptr) returning NULL, or the initial
value of "new = CRYPTO_zalloc(sizeof(uint64_t), NULL, 0)"
still visible despite ossl_rcu_assign_ptr(&writer_ptr, &new)
immediatley after the "*new = global_ctr++" statement.
Add one additional trace message to find out what exactly
happens here, when it happens again.
Additionally, we do no longer initialize the new value to
zero but something else, so it can also be detected.

Related to #27267

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28487)

(cherry picked from commit 17d5c9297ef6f6a4d72788082d6772deb7a18f24)
test/threadstest.c