File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,17 @@ or built as part of
2525are not available on the bot runtime environment (where the fuzz targets run).
2626
2727If you need these dependencies in the runtime environment, you can either:
28- - Install the packages via Dockerfile
28+
29+ - (recommended) Build the dependencies statically in
30+ [ build.sh] ({{ site.baseurl }}/getting-started/new-project-guide/#buildsh)
31+ ([ example] ( https://github.com/google/oss-fuzz/blob/64f8b6593da141b97c98c7bc6f07df92c42ee010/projects/ffmpeg/build.sh#L26 ) ).
32+
33+ - Or install the packages via Dockerfile
2934([ example] ( https://github.com/google/oss-fuzz/blob/2d5e2ef84f281e6ab789055aa735606d3122fda9/projects/tor/Dockerfile#L19 ) )
3035and then link statically against them
3136([ example] ( https://github.com/google/oss-fuzz/blob/2d5e2ef84f281e6ab789055aa735606d3122fda9/projects/tor/build.sh#L40 ) ).
32- - Or build the dependencies statically in
33- [ build.sh] ({{ site.baseurl }}/getting-started/new-project-guide/#buildsh)
34- ([ example] ( https://github.com/google/oss-fuzz/blob/64f8b6593da141b97c98c7bc6f07df92c42ee010/projects/ffmpeg/build.sh#L26 ) ).
37+ ** Dependencies built in this way will not be instrumented** and may prevent
38+ the fuzzer from finding bugs if they are involved in the execution of a fuzz target.
3539
3640All build artifacts needed during fuzz target execution should be inside the
3741` $OUT ` directory. Only those artifacts are archived and used on the bots.
Original file line number Diff line number Diff line change @@ -237,6 +237,10 @@ For an example, see
237237[ecc-diff-fuzzer/Dockerfile](https://github.com/google/oss-fuzz/blob/master/projects/ecc-diff-fuzzer/Dockerfile).
238238where we use `base-builder-rust`and install golang
239239
240+ Runtime dependencies of your project, such as third-party static libraries, will
241+ not be instrumented if you build them in the Dockerfile. In most cases, you will
242+ want to build them in `build.sh` instead.
243+
240244# # build.sh {#buildsh}
241245
242246This file defines how to build binaries for [fuzz targets]({{ site.baseurl }}/reference/glossary/#fuzz-target) in your project.
You can’t perform that action at this time.
0 commit comments