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
./main.go:9:10: new(Array) does not escape
./main.go:11:6: ... argument does not escape
./main.go:11:6: (*t)[1] escapes to heap
./main.go:13:6: ... argument does not escape
Looks like h is on the stack. And probably log.Println() causes the stack to grow (so the pointers change).
./main.go:9:10: new(Array) does not escape
./main.go:11:6: ... argument does not escape
./main.go:11:6: (*t)[1] escapes to heap
./main.go:13:6: ... argument does not escape
Looks like h is on the stack. And probably log.Println() causes the stack to grow (so the pointers change).
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://go.dev/play/p/XvMkBVE5b7Y
What did you expect to see?
These three pointer value are the same.
What did you see instead?
The first value is not the same as the second and the third one.
The text was updated successfully, but these errors were encountered: