2019-07-10 23:11:19 +00:00
|
|
|
# Fuzzing
|
|
|
|
|
|
|
|
Fuzzing support using [go-fuzz](https://github.com/dvyukov/go-fuzz).
|
|
|
|
|
|
|
|
Basic operation:
|
|
|
|
|
|
|
|
```sh
|
2020-04-14 22:46:43 +00:00
|
|
|
$ go install github.com/dvyukov/go-fuzz/go-fuzz
|
|
|
|
$ go install github.com/mdempsky/go114-fuzz-build
|
2019-07-10 23:11:19 +00:00
|
|
|
$ cd internal/fuzz/{fuzzer}
|
2020-04-14 22:46:43 +00:00
|
|
|
$ go114-fuzz-build google.golang.org/protobuf/internal/fuzz/{fuzzer}
|
2019-07-10 23:11:19 +00:00
|
|
|
$ go-fuzz
|
|
|
|
```
|
2019-12-20 18:33:37 +00:00
|
|
|
|
|
|
|
## 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`.
|