]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: implement a more robust mutator
authorKatie Hockman <katie@golang.org>
Tue, 5 Jan 2021 21:01:49 +0000 (16:01 -0500)
committerKatie Hockman <katie@golang.org>
Tue, 12 Jan 2021 16:31:19 +0000 (16:31 +0000)
commit2f072cf8a975afb082b40cb29238ce536b5ae9b6
treefae75c65b3d1657c55d972e40e066e0ddb94c5ab
parenta1646595e63cc0bf7f566bb9b657f826cbda22a1
[dev.fuzz] internal/fuzz: implement a more robust mutator

This change also allocates a larger capacity (100 MB) for the shared
memory at the start, rather than beginning as small as possible and
immediately needing to grow while mutating. This means that 100 MB is
the maximum size of a corpus entry currently, since growing the shared
memory is not yet supported.

The code in internal/fuzz/mutator.go and internal/fuzz/pcg.go are copied
from, or heavily inspired by, code originally authored by Dmitry Vyukov
and Josh Bleecher Snyder as part of the go-fuzz project. Thanks to them
for their contributions. See https://github.com/dvyukov/go-fuzz.

Change-Id: I0d51d53976e23933072e760ff78e6c4ad9dcd862
Reviewed-on: https://go-review.googlesource.com/c/go/+/281972
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
src/cmd/go/testdata/script/test_fuzz_mutate_crash.txt
src/cmd/go/testdata/script/test_fuzz_mutator.txt [moved from src/cmd/go/testdata/script/test_fuzz_mutate.txt with 73% similarity]
src/internal/fuzz/fuzz.go
src/internal/fuzz/mem.go
src/internal/fuzz/mutator.go
src/internal/fuzz/pcg.go [new file with mode: 0644]
src/internal/fuzz/worker.go