From 8e7e842f2daffb2dedc5468aeca1b44f4ed9b5ee Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Sat, 10 Oct 2026 07:54:40 +0200 Subject: [PATCH] fuzzing: don't return 1 from bb_fuzzer on unexpected exceptions (fixes #1224) libFuzzer only accepts 0 and -1 from LLVMFuzzerTestOneInput; any other non-zero value is treated as -1 and the input is dropped from the corpus. nlohmann parse/type errors are not in ExceptionFilter, so most inputs took this path: on the seed corpus only 1 of 5 files was kept (cov 650); with the fall-through to `return 0` all 5 are kept (cov 1607). The message is still printed. The other two fuzzers already return 0 on every path. Co-Authored-By: Claude Opus 5.5 --- fuzzing/bb_fuzzer.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fuzzing/bb_fuzzer.cpp b/fuzzing/bb_fuzzer.cpp index e379a773c..912693d22 100644 --- a/fuzzing/bb_fuzzer.cpp +++ b/fuzzing/bb_fuzzer.cpp @@ -263,7 +263,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) if(!ExceptionFilter::isExpectedException(e)) { std::cerr << "Unexpected top-level exception: " << e.what() << std::endl; - return 1; } }