5 Commits

Author SHA1 Message Date
Alexandr Nedvedicky
818bbcf475 ctx_simd and ctx_ref must be freed in error path
CID 1679597
CID 1679599

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan  8 10:10:49 2026
(Merged from https://github.com/openssl/openssl/pull/29543)
2026-01-08 11:10:46 +01:00
Neil Horman
ee8772e356 prevent large latency in base64_simdutf test
The base64_simdutf test has a printf statement inside a double for loop
that causes a huge amount of latency when run under our perl scripts.
Average run time on my system is about 1min 58 seconds.

We shouldn't be using a printf statement there anyway (likely TEST_info
instead), but we don't need that either, so just remove the printf
entirely.  This decreases the run time to around a second to complete.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29542)
2026-01-07 11:31:05 +11:00
Neil Horman
cf8b11c184 Fix dead code/constant expression in simdutf test
Coverity issues:
https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1677828
and
https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1677827

caught some dead code in the simdutf test.

The total variable is defined as an int, which is tested against <=
INT_MAX, and > INT_MAX, which will always be true, and false
respectively, making the <= test needless, and the condition the latter
bounds dead code

Clean that up.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29525)
2026-01-04 17:51:56 -05:00
Neil Horman
3e8a68008c check for null returns in test_base64_simdutf.c
We derferences two pointers in this code which we fail to check for null
first.  reported by:

https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1677832

Just move the null check a bit higher

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29525)
2026-01-04 17:51:49 -05:00
Nick Nuon
3a69b19028 Added AVX2 encoding + scalar improvements
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29178)
2025-12-23 14:47:41 +11:00