Do not intercept integer compares that are used to increment libFuzzer's
8-bit counters. This is unnecessary and has a negative impact on the
fuzzing performance. This fixes #53760.
Change-Id: Id22efac968b18014eedabb6f0762e1456897024e
GitHub-Last-Rev:
52f69fd68c21001beb7b853d4f0343ece0d3f9d1
GitHub-Pull-Request: golang/go#53786
Reviewed-on: https://go-review.googlesource.com/c/go/+/416796
Run-TryBot: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
switch t.Kind() {
default:
- if base.Debug.Libfuzzer != 0 && t.IsInteger() {
+ if base.Debug.Libfuzzer != 0 && t.IsInteger() && (n.X.Name() == nil || !n.X.Name().Libfuzzer8BitCounter()) {
n.X = cheapExpr(n.X, init)
n.Y = cheapExpr(n.Y, init)