]> Cypherpunks repositories - gostls13.git/commit
internal/coverage/decodemeta: fix coding error in func literal handling
authorThan McIntosh <thanm@google.com>
Fri, 20 Jan 2023 19:03:43 +0000 (14:03 -0500)
committerThan McIntosh <thanm@google.com>
Fri, 20 Jan 2023 21:42:05 +0000 (21:42 +0000)
commit620399ef0d1390a8f7e7061a45d5304ed087889a
tree99b330642c2c992af8f4620f32cb931ca2d11b8c
parentcf70d37967b8447af8305e02ef534c4c5f42d49c
internal/coverage/decodemeta: fix coding error in func literal handling

Fix a coding error in coverage meta-data decoding in the method
decodemeta.CoverageMetaDataDecoder.ReadFunc. The code was not
unconditionally assigning the "function literal" field of the
coverage.FuncDesc object passed in, resulting in bad values depending
on what the state of the field happened to be in the object.

Fixes #57942.

Change-Id: I6dfd7d7f7af6004f05c622f9a7116e9f6018cf4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/462955
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/covdata/dump.go
src/internal/coverage/decodemeta/decode.go
src/internal/coverage/test/roundtrip_test.go