Skip to content

test_wolfssl_EVP_aes_gcm: fix for mem fail testing#8500

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:evp_aes_gcm_test_fix
Feb 25, 2025
Merged

test_wolfssl_EVP_aes_gcm: fix for mem fail testing#8500
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:evp_aes_gcm_test_fix

Conversation

@SparkiDev
Copy link
Copy Markdown
Contributor

Description

Fix test to not leak when memory allocation failure testing. When not supporting AES-GCM streaming, allocation failures occur. Always call cleanup.

Testing

./configure '--disable-shared' '--enable-opensslextra' 'C_EXTRA_FLAGS=-DWOLFSSL_MEM_FAIL_COUNT' 'CC=clang -fsanitize=address' '--enable-debug'
MEM_FAIL_CNT=3 ./tests/unit.test -test_wolfssl_EVP_aes_gcm

master:

MemFailCount Total: 2
MemFailCount Frees: 1

(Also when MEM_FAIL_CNT equals: 5, 7, 9, 11, 13)

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Fix test to not leak when memory allocation failure testing.
When not supporting AES-GCM streaming, allocation failures occur.
Always call cleanup.
@dgarske dgarske merged commit f2c5b4e into wolfSSL:master Feb 25, 2025
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