]> Cypherpunks repositories - gostls13.git/commit
internal/fuzz: compute correct number of mutations
authorRoland Shoemaker <roland@golang.org>
Thu, 18 Nov 2021 21:30:55 +0000 (13:30 -0800)
committerRoland Shoemaker <roland@golang.org>
Fri, 19 Nov 2021 17:42:26 +0000 (17:42 +0000)
commita94409660dbf05c1cdc2013aa2c7aa2489fe5c1c
tree14f9ea0e37f6b1b023655740318797ce7d346ad6
parente8cda0a6c925668972ada40602ada08468fa90dc
internal/fuzz: compute correct number of mutations

When reconstructing inputs, we miscalculated the number of mutations
that needed to be applied. If the count%chainedMutation == 0 we would
apply 0 mutations, when we should actually be applying chainedMutation
mutations, due to how count is incremented.

Fixes #49047

Change-Id: I76773bff0afd6dfd40deafc317be095da995ecc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/365294
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/testdata/script/test_fuzz_mutator_repeat.txt
src/internal/fuzz/worker.go