What changed, and why it matters
This commit fixes a formatting bug in benchmark output. The SHA256AutoDetect function returns a string describing which CPU-accelerated SHA-256 implementations are active. That string previously used commas, which broke CSV-formatted benchmark reports because commas are the field separator. The patch swaps commas for semicolons so benchmark CSV files parse correctly. It is a data-formatting fix, not a security fix.
No security action needed. Treat as a normal bugfix for benchmark output formatting.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is confined to src/crypto/sha256.cpp in SHA256AutoDetect(). It replaces commas with semicolons inside the returned implementation-name string (e.g., ‘x86_shani(1way,2way)’ becomes ‘x86_shani(1way;2way)’, and concatenated suffixes like ‘,sse41(4way)’ become ‘;sse41(4way)’). The only effect is on the string used for benchmark naming/CSV output. No cryptographic code, selection logic, or runtime behavior is altered.
Changed components
src/crypto/sha256.cpp SHA256AutoDetect() return stringInspect captured patch +4 / −4
diff --git a/src/crypto/sha256.cpp b/src/crypto/sha256.cpp
index 902ebf18..d75d01b6 100644
--- a/src/crypto/sha256.cpp
+++ b/src/crypto/sha256.cpp
@@ -625,7 +625,7 @@ std::string SHA256AutoDetect(sha256_implementation::UseImplementation use_implem
Transform = sha256_x86_shani::Transform;
TransformD64 = TransformD64Wrapper<sha256_x86_shani::Transform>;
TransformD64_2way = sha256d64_x86_shani::Transform_2way;
- ret = "x86_shani(1way,2way)";
+ ret = "x86_shani(1way;2way)";
have_sse4 = false; // Disable SSE4/AVX2;
have_avx2 = false;
}
@@ -639,14 +639,14 @@ std::string SHA256AutoDetect(sha256_implementation::UseImplementation use_implem
#endif
#if defined(ENABLE_SSE41)
TransformD64_4way = sha256d64_sse41::Transform_4way;
- ret += ",sse41(4way)";
+ ret += ";sse41(4way)";
#endif
}
#if defined(ENABLE_AVX2)
if (have_avx2 && have_avx && enabled_avx) {
TransformD64_8way = sha256d64_avx2::Transform_8way;
- ret += ",avx2(8way)";
+ ret += ";avx2(8way)";
}
#endif
#endif // defined(HAVE_GETCPUID)
@@ -680,7 +680,7 @@ std::string SHA256AutoDetect(sha256_implementation::UseImplementation use_implem
Transform = sha256_arm_shani::Transform;
TransformD64 = TransformD64Wrapper<sha256_arm_shani::Transform>;
TransformD64_2way = sha256d64_arm_shani::Transform_2way;
- ret = "arm_shani(1way,2way)";
+ ret = "arm_shani(1way;2way)";
}
#endif
#endif // DISABLE_OPTIMIZED_SHA256
Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.