cmd/compile: escape analysis does't treat reflect header correctly #39497
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/PL0FCLCv3qU
and run escape analysis on this code.
What did you expect to see?
The return value of x1 and x2 should be the same. And in both x1 and x2, b should escape to heap.
What did you see instead?
x1() and x2() are not the same. b in x2 doesn't escape to heap.
Full escape analysis output:
The root cause it https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/escape.go#L725 this line. I'm not sure whether this is a bug or a feature.
The text was updated successfully, but these errors were encountered: