Skip to content

Commit 8e7e842

Browse files
facontidavideclaude
andcommitted
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 <noreply@anthropic.com>
1 parent d1098a6 commit 8e7e842

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎fuzzing/bb_fuzzer.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
263263
if(!ExceptionFilter::isExpectedException(e))
264264
{
265265
std::cerr << "Unexpected top-level exception: " << e.what() << std::endl;
266-
return 1;
267266
}
268267
}
269268

0 commit comments

Comments
 (0)