ossfuzz: moving towards the ideal integration

- Start with the basic code from the ossfuzz project.
- Rewrite fuzz corpora to be binary files full of Type-Length-Value
  data, and write a glue layer in the fuzzing function to convert
  corpora into CURL options.
- Have supporting functions to generate corpora from existing tests
- Integrate with Makefile.am
This commit is contained in:
Max Dymond 2017-08-27 15:57:05 +01:00 committed by Daniel Stenberg
parent 222e65fd78
commit efeb4a3176
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
19 changed files with 767 additions and 162 deletions

View file

@ -2,13 +2,18 @@ Fuzz tests
==========
The goal is to add tests for *ALL* protocols supported in libcurl.
We will need some additional patches in the future, to increase coverage.
Building the fuzz target
========================
From the CURL root directory:
CC=clang-5.0 CFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp" ./configure --disable-shared --enable-debug --enable-maintainer-mode
export CC=clang-5.0
export CFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp"
./configure --disable-shared --enable-debug --enable-maintainer-mode
make -sj
cd tests/fuzz
make
(optional) export LIB_FUZZING_ENGINE=<path to libFuzzer.a>
make check