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
{{ message }}
Repository navigation
maps: maps.Clone reference semantics when cloning a map with large value types #64474
Activity
bcmills commentedon Nov 30, 2023
@gopherbot, please backport to Go 1.21. This appears to cause subtle aliasing bugs in cloned maps.
gopherbot commentedon Nov 30, 2023
Backport issue(s) opened: #64475 (for 1.21).
Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.
findleyr commentedon Nov 30, 2023
(I made a minor correction to the original report, changing the expectation to
2 1(from1 2)).mauri870 commentedon Nov 30, 2023
I can confirm this behavior changed after CL 471400 moved the Clone implementation to the runtime.
randall77 commentedon Nov 30, 2023
@cuiweixie
mauri870 commentedon Nov 30, 2023
The bug triggers this branch of mapclone2 https://go.googlesource.com/go/+/refs/heads/master/src/runtime/map.go#1512
gopherbot commentedon Dec 1, 2023
Change https://go.dev/cl/546515 mentions this issue:
maps: fix aliasing problems with Clonemaps: fix aliasing problems with Clone
maps: fix aliasing problems with Clone