Skip to content

Fix SHA2 benchmarks skipped in non-DMA builds - #497

Open
kojiws wants to merge 1 commit into
wolfSSL:mainfrom
kojiws:fix_sha2_benchmark
Open

Fix SHA2 benchmarks skipped in non-DMA builds#497
kojiws wants to merge 1 commit into
wolfSSL:mainfrom
kojiws:fix_sha2_benchmark

Conversation

@kojiws

@kojiws kojiws commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes two bugs in benchmark/bench_modules/wh_bench_mod_sha2.c:

  1. In a default (non-DMA) build, wh_Bench_Mod_Sha256/224/384/512 returned
    WH_ERROR_NOTIMPL and were silently -> SKIPPED.
  2. _benchSha256 returned directly when wh_Bench_SetDataSize failed, leaking the
    DMA-heap buffers.

Test

Fix 1: with make (non-DMA), all four SHA2 results now appear; previously none did.

Fix 2: verified by inspection/compilation only — triggering it needs a
wh_Bench_SetDataSize failure, which was not fault-injected.

@kojiws kojiws self-assigned this Jul 27, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #497

No scan targets match the changed files in this PR. Review skipped.

@kojiws kojiws assigned wolfSSL-Bot and unassigned kojiws Jul 28, 2026
@kojiws kojiws changed the title Fix SHA2 benchmarking Fix SHA3 benchmarks skipped in non-DMA builds Jul 29, 2026
@kojiws kojiws changed the title Fix SHA3 benchmarks skipped in non-DMA builds Fix SHA2 benchmarks skipped in non-DMA builds Jul 29, 2026
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