]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: mapassign_* should use typedmemmove to update keys
authorKeith Randall <khr@golang.org>
Sat, 5 Aug 2017 16:58:41 +0000 (09:58 -0700)
committerKeith Randall <khr@golang.org>
Mon, 7 Aug 2017 06:24:42 +0000 (06:24 +0000)
commit579120323fdf0c6939fa3e3c6c63b669b6437e31
tree0c3db3ff24ad5a0b45c5e34e0747eefd3d09ebec
parent380525598ca917fe3226842f91695f4851b34e89
runtime: mapassign_* should use typedmemmove to update keys

We need to make sure that when the key contains a pointer, we use
a write barrier to update the key.

Also mapdelete_* should use typedmemclr.

Fixes #21297

Change-Id: I63dc90bec1cb909c2c6e08676c9ec853d736cdf8
Reviewed-on: https://go-review.googlesource.com/53414
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/hashmap_fast.go