diff --git a/docs/fuzzer_environment.md b/docs/fuzzer_environment.md index b44b4917a..d433ff2f9 100644 --- a/docs/fuzzer_environment.md +++ b/docs/fuzzer_environment.md @@ -5,21 +5,25 @@ Your fuzz targets will be run on a [Google Compute Engine](https://cloud.google. ## Runtime Dependencies You should not make any assumptions on the availability of dependent packages -and libraries in the execution environment. Make sure to link statically any -library dependencies with your fuzz target executable during build time -([example](https://github.com/google/oss-fuzz/blob/master/projects/tor/build.sh#L40)). - -It is not required to build all dependecies in -[build.sh](https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#buildsh). -You can install any available packages via +in the execution environment. Packages that are installed in [Dockerfile](https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#dockerfile) -([example](https://github.com/google/oss-fuzz/blob/master/projects/tor/Dockerfile#L19)), -but make sure that you link statically against them. Those installed packages will be -available only on the builder machine, and not on the bots running the fuzz targets. +or built as part of +[build.sh](https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#buildsh) +are not available on the bot runtime environment (that run the fuzz targets). + +If you need these dependencies in the runtime environment, you can either +- Install the packages in Dockerfile +([example](https://github.com/google/oss-fuzz/blob/master/projects/tor/Dockerfile#L19)) +and then link statically against them +([example](https://github.com/google/oss-fuzz/blob/master/projects/tor/build.sh#L40)) +- Or build the dependencies statically in +[build.sh](https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#buildsh) +([example](https://github.com/google/oss-fuzz/blob/master/projects/ffmpeg/build.sh#L26)). All build artifacts needed during fuzz target execution should be inside `$OUT` -directory. Other directories like `$WORK`, `$SRC` OR dependent packages installed -in build.sh will not be available. +directory. Only those artifacts are archived and used on the bots. Everything else +is ignored (e.g. artifacts in `$WORK`, `$SRC`, etc) and hence is not available +in the execution environment. You should ensure that the fuzz target works correctly by using `run_fuzzer` command (see instructions [here](new_project_guide.md#testing-locally)). This command uses