Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20250206-unit-test-helgrind-fixes #8423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Feb 6, 2025

tests/api.c: fix data races in test_wolfSSL_CTX_add_session_ctx_ready() using a mutex, and in test_wolfSSL_dtls_AEAD_limit() using a mutex, an atomic integer, and a volatile attribute.

wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_ATOMIC_LOAD() and WOLFSSL_ATOMIC_STORE() definitions.

tested with wolfssl-multi-test.sh ... quantum-safe-wolfssl-all-intelasm-sp-asm-helgrind check-source-text

(quantum-safe-wolfssl-all-intelasm-sp-asm-helgrind is a new test)

Note, also tried testing using valgrind --tool=drd but saw various nondeterministic failures, in e.g. test_wolfSSL_UseALPN_connection, test_wolfSSL_BIO_accept, and particularly, test_ticket_and_psk_mixing_on_result. Not yet known if true or false positive.

…() using a mutex, and in test_wolfSSL_dtls_AEAD_limit() using a mutex, an atomic integer, and a volatile attribute.

wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_ATOMIC_LOAD() and WOLFSSL_ATOMIC_STORE() definitions.
@douzzer
Copy link
Contributor Author

douzzer commented Feb 6, 2025

retest this please (PRB master job didn't do anything)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants