1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 22:15:13 -05:00
curl/tests/fuzz
Max Dymond 57001ce3bb ossfuzz: Move to C++ for curl_fuzzer.
Automake gets confused if you want to use C++ static libraries with C
code - basically we need to involve the clang++ linker. The easiest way
of achieving this is to rename the C code as C++ code. This gets us a
bit further along the path and ought to be compatible with Google's
version of clang.
2017-09-02 11:07:55 +02:00
..
curl_fuzz_data ossfuzz: additional seed corpora 2017-09-01 11:23:07 +02:00
curl_fuzzer.cc ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
curl_fuzzer.h ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
generate_corpus.py ossfuzz: moving towards the ideal integration 2017-09-01 11:22:51 +02:00
Makefile.am ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
Makefile.inc ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
README ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
standalone_fuzz_target_runner.cc ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00
testinput.h ossfuzz: Move to C++ for curl_fuzzer. 2017-09-02 11:07:55 +02:00

Fuzz tests
==========

The goal is to add tests for *ALL* protocols supported in libcurl.

Building the fuzz target
========================
From the CURL root directory:

export CC=clang-5.0
export CXX=clang++-5.0
export CFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp"
export CXXFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp -stdlib=libc++"
./configure --disable-shared --enable-debug --enable-maintainer-mode
make -sj

cd tests/fuzz

(optional) export LIB_FUZZING_ENGINE=<path to libFuzzer.a>

make check