From ba9db0ddaeea6c0728b54f7f95fe604aa6dc1165 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 16 May 2024 21:41:18 -0700 Subject: [PATCH] Add basic debug printing --- FacadeFuzz.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/FacadeFuzz.cpp b/FacadeFuzz.cpp index f772a18..6751a3a 100644 --- a/FacadeFuzz.cpp +++ b/FacadeFuzz.cpp @@ -38,7 +38,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { while (gArbitrary.hasEntropy()) { switch (gArbitrary.bounded(3)) { case 0: { - // Add mutations +// Add mutations +#if DEBUG + printf("Add mutations\n"); +#endif const int numKeys = gArbitrary.bounded(10); std::set keySet; @@ -80,7 +83,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } break; case 1: { - // Set oldest version +// Set oldest version +#if DEBUG + printf("Set oldest version\n"); +#endif const int64_t newOldestVersion = facade.getOldestVersion() + @@ -93,6 +99,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case 2: { // Check range read +#if DEBUG + printf("Check range read\n"); +#endif + const int64_t version = facade.getOldestVersion() + gArbitrary.bounded(facade.getVersion() - facade.getOldestVersion() + 1);