mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-10 07:05:11 +00:00
75f53c59e1
All the fuzzers have the same test, which runs the fuzzer against every entry in the corpus. Move the test logic into a separate package. Change-Id: I3a7e2ca75d20a5ff6d51ed9e6151629e6667684b Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/212258 Reviewed-by: Joe Tsai <joetsai@google.com>
26 lines
710 B
Markdown
26 lines
710 B
Markdown
# Fuzzing
|
|
|
|
Fuzzing support using [go-fuzz](https://github.com/dvyukov/go-fuzz).
|
|
|
|
Basic operation:
|
|
|
|
```sh
|
|
$ go install github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
|
|
$ cd internal/fuzz/{fuzzer}
|
|
$ GOFUZZ111MODULE=on go-fuzz-build .
|
|
$ go-fuzz
|
|
```
|
|
|
|
## OSS-Fuzz
|
|
|
|
Fuzzers are automatically run by
|
|
[OSS-Fuzz](https://github.com/google/oss-fuzz).
|
|
|
|
The OSS-Fuzz
|
|
[configuration](https://github.com/google/oss-fuzz/blob/master/projects/golang-protobuf/build.sh)
|
|
currently builds fuzzers in every directory under internal/fuzz.
|
|
Only add fuzzers (not support packages) in this directory.
|
|
|
|
Fuzzing results are available at the [OSS-Fuzz console](https://oss-fuzz.com/),
|
|
under `golang-protobuf`.
|