aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzer/invert.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-02 08:21:58 -0400
committerJack Lloyd <[email protected]>2017-09-02 08:21:58 -0400
commit4d8d8594b7a75675a19b7feec8fd917b92ec0edd (patch)
tree525daf1ac9aaec38403b1ef864ff2942c16a6c57 /src/fuzzer/invert.cpp
parentbc7608874cf7ec4aef35a6e693dbbbf79c83b519 (diff)
Clean up fuzzer code a bit
If we ever output something to the terminal it should be because we are crashing.
Diffstat (limited to 'src/fuzzer/invert.cpp')
-rw-r--r--src/fuzzer/invert.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/fuzzer/invert.cpp b/src/fuzzer/invert.cpp
index 08e8229b8..dd91fe83f 100644
--- a/src/fuzzer/invert.cpp
+++ b/src/fuzzer/invert.cpp
@@ -71,17 +71,13 @@ void fuzz(const uint8_t in[], size_t len)
if(ref != ct)
{
- std::cout << "X = " << x << "\n";
- std::cout << "P = " << mod << "\n";
- std::cout << "GCD = " << gcd(x, mod) << "\n";
- std::cout << "Ref = " << ref << "\n";
- std::cout << "CT = " << ct << "\n";
- //std::cout << "Mon = " << mon << "\n";
-
- std::cout << "RefCheck = " << (ref*ref)%mod << "\n";
- std::cout << "CTCheck = " << (ct*ct)%mod << "\n";
- //std::cout << "MonCheck = " << (mon*mon)%mod << "\n";
- abort();
+ FUZZER_WRITE_AND_CRASH("X = " << x << "\n"
+ << "P = " << mod << "\n"
+ << "GCD = " << gcd(x, mod) << "\n"
+ << "Ref = " << ref << "\n"
+ << "CT = " << ct << "\n"
+ << "RefCheck = " << (ref*ref)%mod << "\n"
+ << "CTCheck = " << (ct*ct)%mod << "\n");
}
}