Skip to content

Commit 23a505f

Browse files
committed
Remove comment suggesting the undefined sanitizer is a valid option
Also makes come structural improvements to how the local instructions for running OSS-Fuzz are presented now that only the single `address` sanitizer is a valid option. The `undefined` sanitizer was removed from GitPython's `project.yaml` OSS-Fuzz configuration file at the request of OSS-Fuzz project reviewers in google/oss-fuzz#11803. The `undefined` sanitizer is only useful in Python projects that use native exstensions (such as C, C++, Rust, ect.), which GitPython does not currently do. This commit updates the `fuzzing/README` reference to that sanitizer accoirdingly. See: - google/oss-fuzz@b210fb2 - google/oss-fuzz#11803 (comment)
1 parent a30f9b9 commit 23a505f

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

fuzzing/README.md

+13-15
Original file line numberDiff line numberDiff line change
@@ -129,26 +129,15 @@ This approach uses Docker images provided by OSS-Fuzz for building and running f
129129
comprehensive features but requires a local clone of the OSS-Fuzz repository and sufficient disk space for Docker
130130
containers.
131131

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
144133

145134
Clone the OSS-Fuzz repository and prepare the Docker environment:
146135

147136
```shell
148137
git clone --depth 1 https://github.com/google/oss-fuzz.git oss-fuzz
149138
cd oss-fuzz
150139
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
152141
```
153142

154143
> [!TIP]
@@ -160,16 +149,25 @@ python infra/helper.py build_fuzzers --sanitizer $SANITIZER gitpython
160149
> Then running this command would build new or modified fuzz targets using the `~/code/GitPython/fuzzing/fuzz-targets`
161150
> directory:
162151
> ```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
164153
> ```
165154
166-
167155
Verify the build of your fuzzers with the optional `check_build` command:
168156
169157
```shell
170158
python infra/helper.py check_build gitpython
171159
```
172160
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+
173171
Execute the desired fuzz target:
174172

175173
```shell

0 commit comments

Comments
 (0)