[openssl/openssl] 5f8b81: Add locking to atomic operations in rw/rcu tests

Neil Horman noreply at github.com
Tue Apr 2 08:27:33 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 5f8b812931e5da24df08913c05ff8e4f4494f014
      https://github.com/openssl/openssl/commit/5f8b812931e5da24df08913c05ff8e4f4494f014
  Author: Neil Horman <nhorman at openssl.org>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M test/threadstest.c

  Log Message:
  -----------
  Add locking to atomic operations in rw/rcu tests

I neglected to add locks to the calls to CRYPTO_atomic_add in these
test, which on newer compilers is fine, as atomic operations are
defined.  However on older compilers the __ATOMIC_ACQ_REL definition is
missing causing these function to be implemented using an rwlock, which
when NULL causes the locks to fail.

Fix this my creating the lock and using them appropriately

Fixes #24000

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <ppzgs1 at gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24001)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list