diff options
author | Patrick Steinhardt <ps@pks.im> | 2020-02-18 18:42:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 18:42:12 +0100 |
commit | e86607084c75b7d55ec23e28f9f8d6c915238ecf (patch) | |
tree | 56cedb3a26703641633ca565e3356425eec4e77e | |
parent | ee3307a183e39d602b25fa94831c6fc09e7c1b61 (diff) | |
parent | 795a5b2cdfaace0a950d6953585e723abdb81cba (diff) | |
download | libgit2-e86607084c75b7d55ec23e28f9f8d6c915238ecf.tar.gz |
Merge pull request #5400 from lhchavez/fix-packfile-fuzzer
fuzzers: Fix the documentation
-rw-r--r-- | docs/fuzzing.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/fuzzing.md b/docs/fuzzing.md index cd825766b..25b32cb04 100644 --- a/docs/fuzzing.md +++ b/docs/fuzzing.md @@ -3,7 +3,7 @@ libgit2 is currently using [libFuzzer](https://libfuzzer.info) to perform automated fuzz testing. libFuzzer only works with clang. -## Prerequisites** for building fuzz targets: +## Prerequisites for building fuzz targets: 1. All the prerequisites for [building libgit2](https://github.com/libgit2/libgit2). 2. A recent version of clang. 6.0 is preferred. [pre-build Debian/Ubuntu @@ -27,14 +27,15 @@ automated fuzz testing. libFuzzer only works with clang. ## Run the fuzz targets -1. `ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolize-6.0 +1. `ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolize LSAN_OPTIONS=allocator_may_return_null=1 - ASAN_OPTIONS=allocator_may_return_null=1 ./build/fuzz/fuzz_packfile_raw - fuzz/corpora/fuzz_packfile_raw/` + ASAN_OPTIONS=allocator_may_return_null=1 ./build/fuzzers/packfile_fuzzer + fuzzers/corpora/packfile/` The `LSAN_OPTIONS` and `ASAN_OPTIONS` are there to allow `malloc(3)` to return -`NULL`. The `LLVM_PROFILE_FILE` is there to override the path where libFuzzer -will write the coverage report. +`NULL`, which is expected if a huge chunk of memory is allocated. The +`LLVM_PROFILE_FILE` environment string can also be added to override the path +where libFuzzer will write the coverage report. ## Get coverage |