File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,19 @@ 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+
2829- Install the packages via Dockerfile
2930([ example] ( https://github.com/google/oss-fuzz/blob/2d5e2ef84f281e6ab789055aa735606d3122fda9/projects/tor/Dockerfile#L19 ) )
3031and then link statically against them
3132([ example] ( https://github.com/google/oss-fuzz/blob/2d5e2ef84f281e6ab789055aa735606d3122fda9/projects/tor/build.sh#L40 ) ).
33+ ** These dependencies will not be instrumented** and may prevent the fuzzer from finding
34+ bugs when they are involved in the execution of a fuzz target.
35+
3236- Or build the dependencies statically in
3337[ build.sh] ({{ site.baseurl }}/getting-started/new-project-guide/#buildsh)
3438([ example] ( https://github.com/google/oss-fuzz/blob/64f8b6593da141b97c98c7bc6f07df92c42ee010/projects/ffmpeg/build.sh#L26 ) ).
39+ This is the preferred method for building dependencies, as it will instrument
40+ them for fuzzing and allow their execution to be followed by the fuzzer.
3541
3642All build artifacts needed during fuzz target execution should be inside the
3743` $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