You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is written incorrectly. The update to f.Lit should be unconditional (since we can't make any assumptions about the state of the FuncDesc passed in). If clients always pass in a zero FuncDesc everything will appear to work ok, but if not, the state of the "Lit" field will be whatever it was set to on the last go around.
The text was updated successfully, but these errors were encountered:
…r 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 <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
(cherry picked from commit 620399e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/463418
Reviewed-by: Than McIntosh <[email protected]>
Run-TryBot: Matthew Dempsky <[email protected]>
Auto-Submit: Matthew Dempsky <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Only on tip / go 1.20
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Build this program with "-cover" and run to collect coverage profile.
https://go.dev/play/p/Gs7UJrWz86r?v=gotip
E.g.
What did you expect to see?
Coverage profile includes "main".
What did you see instead?
Coverage profile is missing "main":
What's happening here is that there is a coding error in the handling of the function literal flag in the meta-data decoder., this code here:
is written incorrectly. The update to f.Lit should be unconditional (since we can't make any assumptions about the state of the FuncDesc passed in). If clients always pass in a zero FuncDesc everything will appear to work ok, but if not, the state of the "Lit" field will be whatever it was set to on the last go around.
The text was updated successfully, but these errors were encountered: