Update building_running_fuzzers.md

This commit is contained in:
Kostya Serebryany 2016-11-21 13:43:12 -08:00 committed by GitHub
parent ee9deb248a
commit f59fd057a9
1 changed files with 1 additions and 38 deletions

View File

@ -1,38 +1 @@
# Building and Running Fuzzers
_This page documents building and running fuzzers as part of OSS target source tree._
_See [External Fuzzer](building_running_fuzzers_external.md) process for oss-fuzz fuzzers._
## Prerequisites
[Install Docker]. The toolchain setup necessary to build coverage-guided fuzzers is complicated. Docker is used
to simplify distribution of the toolchain and to produce repeatable results for distributed execution.
## Building Fuzzers
Building fuzzer is a two-step process:
1. Building a container ready to compile fuzzers:
<pre>
<i># in target directory</i>
docker build -t ossfuzz/<b><i>$target_name</i></b> .
</pre>
2. Build fuzzers:
<pre>
<i># in target directory</i>
docker run -ti -v /tmp/out:/out ossfuzz/<b><i>$target_name</i></b>
</pre>
`/tmp/out` will contain fuzzers.
## Running Fuzzers
Fuzzers are statically linked executables and could be executed normally in Unbuntu-like environment.
When Ubuntu environment is not available (or a restricted environment is desirable), the fuzzer can easily be run inside docker
container:
<pre>
docker run -ti -v /tmp/out:/out -t ossfuzz/libfuzzer-runner /out/<b><i>$fuzzer</i></b> --runs=100
</pre>
[Install Docker]: https://docs.docker.com/engine/installation/
# This page is deprecated, see the home page at https://github.com/google/oss-fuzz