This directory contains fuzzing tests for Leptonica. Each test is in a separate source file *_fuzzer.cc.
Normally these fuzzing tests are run by OSS-Fuzz, but can also be run locally.
Local builds require the clang compiler. Use clang-10 on Debian GNU Linux, which can be installed using
sudo apt-get install clang-10
To build:
./configure CC=clang-10 CXX=clang++-10
make fuzzers CXX=clang++-10
Each local fuzzer can be run as in the following example.
# Show command line syntax.
./barcode_fuzzer -help=1
# Run the fuzzer.
./barcode_fuzzer