| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a30f9b9 commit 23a505f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -129,26 +129,15 @@ This approach uses Docker images provided by OSS-Fuzz for building and running f | |||
| 129 | 129 | comprehensive features but requires a local clone of the OSS-Fuzz repository and sufficient disk space for Docker | |
| 130 | 130 | containers. | |
| 131 | 131 | ||
| 132 | - #### Preparation | ||
| 133 | - | ||
| 134 | - Set environment variables to simplify command usage: | ||
| 135 | - | ||
| 136 | - ```shell | ||
| 137 | - # $SANITIZER can be either 'address' or 'undefined': | ||
| 138 | - export SANITIZER=address | ||
| 139 | - # specify the fuzz target without the .py extension: | ||
| 140 | - export FUZZ_TARGET=fuzz_config | ||
| 141 | - ``` | ||
| 142 | - | ||
| 143 | - #### Build and Run | ||
| 132 | + #### Build the Execution Environment | ||
| 144 | 133 | ||
| 145 | 134 | Clone the OSS-Fuzz repository and prepare the Docker environment: | |
| 146 | 135 | ||
| 147 | 136 | ```shell | |
| 148 | 137 | git clone --depth 1 https://github.com/google/oss-fuzz.git oss-fuzz | |
| 149 | 138 | cd oss-fuzz | |
| 150 | 139 | python infra/helper.py build_image gitpython | |
| 151 | - python infra/helper.py build_fuzzers --sanitizer $SANITIZER gitpython | ||
| 140 | + python infra/helper.py build_fuzzers --sanitizer address gitpython | ||
| 152 | 141 | ``` | |
| 153 | 142 | ||
| 154 | 143 | > [!TIP] | |
@@ -160,16 +149,25 @@ python infra/helper.py build_fuzzers --sanitizer $SANITIZER gitpython | |||
| 160 | 149 | > Then running this command would build new or modified fuzz targets using the `~/code/GitPython/fuzzing/fuzz-targets` | |
| 161 | 150 | > directory: | |
| 162 | 151 | > ```shell | |
| 163 | - > python infra/helper.py build_fuzzers --sanitizer $SANITIZER gitpython ~/code/GitPython | ||
| 152 | + > python infra/helper.py build_fuzzers --sanitizer address gitpython ~/code/GitPython | ||
| 164 | 153 | > ``` | |
| 165 | 154 | ||
| 166 | - | ||
| 167 | 155 | Verify the build of your fuzzers with the optional `check_build` command: | |
| 168 | 156 | ||
| 169 | 157 | ```shell | |
| 170 | 158 | python infra/helper.py check_build gitpython | |
| 171 | 159 | ``` | |
| 172 | 160 | ||
| 161 | + #### Run a Fuzz Target | ||
| 162 | + | ||
| 163 | + Setting an environment variable for the fuzz target argument of the execution command makes it easier to quickly select | ||
| 164 | + a different target between runs: | ||
| 165 | + | ||
| 166 | + ```shell | ||
| 167 | + # specify the fuzz target without the .py extension: | ||
| 168 | + export FUZZ_TARGET=fuzz_config | ||
| 169 | + ``` | ||
| 170 | + | ||
| 173 | 171 | Execute the desired fuzz target: | |
| 174 | 172 | ||
| 175 | 173 | ```shell | |
| Back | FazBrowse Home | New Git URL |
0 commit comments