• Home
  • Raw
  • Download

Lines Matching +full:oss +full:- +full:fuzz

1 ---
7 permalink: /clusterfuzzlite/build-integration/
8 ---
12 - TOC
14 ---
18 [libFuzzer targets]({{ site.baseurl }}/reference/glossary/#fuzz-target) on
21 We re-use the [OSS-Fuzz](https://github.com/google/oss-fuzz) toolchain to make
28 - [Integrate]({{ site.baseurl }}/advanced-topics/ideal-integration/) one or more [fuzz targets]({{ …
29 with the project you want to fuzz. For examples, see TODO.
30 - [Install Docker](https://docs.docker.com/engine/installation)
31 [Why Docker?]({{ site.baseurl }}/faq/#why-do-you-use-docker)
34 …cker group](https://docs.docker.com/engine/installation/linux/ubuntulinux/#/create-a-docker-group).
37 [docker-cleanup](https://gist.github.com/mikea/d23a839cba68778d94e0302e8a2c200f)
38 periodically to garbage-collect unused images.
40 - Clone the OSS-Fuzz repo: `git clone https://github.com/google/oss-fuzz.git`
45 * [./clusterfuzzlite/project.yaml](#projectyaml) - provides metadata about the project.
46 * [./clusterfuzzlite/Dockerfile](#dockerfile) - defines the container environment with information
47 …endencies needed to build the project and its [fuzz targets]({{ site.baseurl }}/reference/glossary…
48 * [./clusterfuzzlite/build.sh](#buildsh) - defines the build script that executes inside the Docker…
57 $ cd /path/to/oss-fuzz
59 $ python infra/helper.py generate $PATH_TO_PROJECT --external
70 - [language](#language)
78 * [`go`]({{ site.baseurl }}//getting-started/new-project-guide/go-lang/)
79 * [`rust`]({{ site.baseurl }}//getting-started/new-project-guide/rust-lang/)
80 * [`python`]({{ site.baseurl }}//getting-started/new-project-guide/python-lang/)
81 …vm` (Java, Kotlin, Scala and other JVM-based languages)]({{ site.baseurl }}//getting-started/new-p…
90 FROM gcr.io/oss-fuzz-base/base-builder # base image with clang toolchain
91 RUN apt-get update && apt-get install -y ... # install required packages to build your project
100 This file defines how to build binaries for [fuzz targets]({{ site.baseurl }}/reference/glossary/#f…
105 - Build the project using your build system with OSS-Fuzz's compiler.
106 - Provide OSS-Fuzz's compiler flags (defined as [environment variables](#Requirements)) to the buil…
107 - Build your [fuzz targets]({{ site.baseurl }}/reference/glossary/#fuzz-target)
113 ([source](https://github.com/google/oss-fuzz/blob/master/projects/expat/build.sh)):
116 #!/bin/bash -eu
123 make -j$(nproc) all
125 $CXX $CXXFLAGS -std=c++11 -Ilib/ \
126 $SRC/parse_fuzzer.cc -o $OUT/parse_fuzzer \
132 …ut the [Integrating a Go project]({{ site.baseurl }}//getting-started/new-project-guide/go-lang/) …
135 1. Make sure that the binary names for your [fuzz targets]({{ site.baseurl }}/reference/glossary/#f…
136 alphanumeric characters, underscore(_) or dash(-). Otherwise, they won't run.
166 |---------| ------------ | ---------- |
167 | `/out/` | `$OUT` | Directory to store build artifacts (fuzz targets, dictionaries, option…
174 In case your fuzz target uses the [FuzzedDataProvider] class, make sure it is
177 …aProvider]: https://github.com/google/fuzzing/blob/master/docs/split-inputs.md#fuzzed-data-provider
183 You *must* use the special compiler flags needed to build your project and fuzz targets.
187 | ------------- | --------
190 | `$LIB_FUZZING_ENGINE` | C++ compiler argument to link fuzz target against the prebuilt engine li…
194 Most well-crafted build scripts will automatically use these variables. If not,
197 …riables](https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-builder/README.md#p…
198 `base-builder` image documentation for more details.
203fuzz targets]({{ site.baseurl }}/reference/glossary/#fuzz-target) run in, and the assumptions you …
207 You can build your docker image and fuzz targets locally, so you can test them
209 … time using it to build your docker image and [fuzz targets]({{ site.baseurl }}/reference/glossary…
212 $ cd /path/to/oss-fuzz
213 $ python infra/helper.py build_image $PATH_TO_PROJECT --external
214 … python infra/helper.py build_fuzzers $PATH_TO_PROJECT --sanitizer <address/undefined/coverage> --
217 The built binaries appear in the `/path/to/oss-fuzz/build/out/$PROJECT_NAME`
222 **Note:** You *must* run your fuzz target binaries inside the base-runner docker
228 $ python infra/helper.py check_build $PATH_TO_PROJECT --external
231 3. If you want to test changes against a particular fuzz target, run the following command:
234 …$ python infra/helper.py run_fuzzer --external --corpus-dir=<path-to-temp-corpus-dir> $PATH_TO_PRO…
238 your fuzz targets get to the code you expect. This would use the corpus
242 $ python infra/helper.py build_fuzzers --sanitizer coverage $PATH_TO_PROJECT
243 …infra/helper.py coverage $PATH_TO_PROJECT --fuzz-target=<fuzz_target> --corpus-dir=<path-to-temp-c…
248 [code coverage]({{ site.baseurl }}/advanced-topics/code-coverage/) for detailed
254 of the supported build configurations with the above commands (build_fuzzers -> run_fuzzer -> cover…
257 …ience failures, review your [dependencies]({{site.baseurl }}/further-reading/fuzzer-environment/#d…
261 If you run into problems, the [Debugging page]({{ site.baseurl }}/advanced-topics/debugging/) lists…
262 [fuzz targets]({{ site.baseurl }}/reference/glossary/#fuzz-target).
266 To improve your fuzz target ability to find bugs faster, please read [this section](
267 {{ site.baseurl }}/getting-started/new-project-guide/#efficient-fuzzing).
269 TODO(metzman): We probably want a TOC for lang-specific guides (which we still need to add).