Example of OSS-Fuzz ideal integration.
This directory contains an example software project that has most of the traits of ideal support for fuzzing.
Imagine that these files reside in your project's repository:
DoStuff()
inside my_api.cpp contains a bug. (Find it!)DoStuff()
. Unit tests are not necessary for fuzzing but are generally a good practice.DoStuff()
.DoStuff()
. Optional, but may improve fuzzing in many cases.$CC
, $CXX
, $CFLAGS
, $CXXFLAGS
$LIB_FUZZING_ENGINE
, by default uses standalone_fuzz_target_runner.cppmake check
executes do_stuff_fuzzer.cpp on do_stuff_test_data/*
, thus ensures that the fuzz target is up to date and uses it as a regression test.Example bug report filed automatically: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1562