]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix libfuzzer instrumentation line number
authorKeith Randall <khr@golang.org>
Fri, 8 Jul 2022 21:52:23 +0000 (14:52 -0700)
committerKeith Randall <khr@google.com>
Fri, 8 Jul 2022 23:41:37 +0000 (23:41 +0000)
commitc1a4e0fe014568501b194eb8b04309f54eee6b4c
treeb9460630ed20ba8a43ea0db1ce9999d96006f1fe
parent5c1a13e7a47bc47c07057c0acf626e3fafe064c9
cmd/compile: fix libfuzzer instrumentation line number

Set a reasonable starting line number before processing the body of
the function in the order pass.

We update base.Pos each time we process a node, but some of the
libfuzzer instrumentation is added before we process any node, so the
base.Pos used is junk.

Fixes #53688

Change-Id: I3654b805eabb8866a9a1574845ef4ff062797319
Reviewed-on: https://go-review.googlesource.com/c/go/+/416654
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/walk/order.go