summaryrefslogtreecommitdiff
path: root/validat9.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2022-08-24 23:00:04 -0400
committerGitHub <noreply@github.com>2022-08-24 23:00:04 -0400
commit0b5747421b279283fc6d1b1065dc01fb5d1ec997 (patch)
tree3bc490e2e4f80f3c2ff907f35d48112da44a46b7 /validat9.cpp
parent307ada58d618eb05c89b6e4a6bc55ac4026a7e9a (diff)
downloadcryptopp-git-0b5747421b279283fc6d1b1065dc01fb5d1ec997.tar.gz
Add -fno-devirtualize when using GCC 12 (GH #1134, GH #1141, PR #1147)
This is not a fix since it only treats the symptom of GCC removing live code. We do not know why GCC is doing it.
Diffstat (limited to 'validat9.cpp')
-rw-r--r--validat9.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/validat9.cpp b/validat9.cpp
index 23530ccc..e00af4eb 100644
--- a/validat9.cpp
+++ b/validat9.cpp
@@ -652,20 +652,17 @@ bool ValidateECGDSA(bool thorough)
{
std::cout << "\nECGDSA validation suite running...\n\n";
- // 'thorough' forced to false due to GH #1134. There is something sideways
- // with GCC 12 and ECGDSA+RIPEMD. The problem is present with
- // CRYPTOPP_DISABLE_ASM, which indicates a C++ problem. However, Asan,
- // UBsan and Valgrind fail to produce a finding. The program simply crashes
- // with a junk backtrace. And GCC 11 (and earlier), Clang, MSVC, xlC are Ok.
- // This is likely a compiler bug.
-#if CRYPTOPP_GCC_VERSION >= 120000
- thorough = false;
-#endif
+ bool pass = true, fail;
+
+ fail = !ValidateECGDSAStandard();
+ pass = pass && !fail;
- if (thorough)
- return ValidateECGDSAStandard() && ValidateECGDSAThorough();
- else
- return ValidateECGDSAStandard();
+ if (thorough) {
+ fail = !ValidateECGDSAThorough();
+ pass = pass && !fail;
+ }
+
+ return pass;
}
bool ValidateESIGN()