go/src/maps
Keith Randall 16d3040a84 maps: fix aliasing problems with Clone
Make sure to alloc+copy large keys and values instead of aliasing them,
when they might be updated by a future assignment.

Fixes #64474

Change-Id: Ie2226a81cf3897e4e2ee24472f2966d397ace53f
Reviewed-on: https://go-review.googlesource.com/c/go/+/546515
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2023-12-05 17:05:56 +00:00
..
example_test.go maps: add examples for Clone,Copy and Equal 2023-10-11 20:21:56 +00:00
maps.go maps: remove Keys and Values 2023-07-26 21:40:38 +00:00
maps.s
maps_test.go maps: fix aliasing problems with Clone 2023-12-05 17:05:56 +00:00