runtime: test memmove writes pointers atomically

In the previous CL we ensures that memmove writes pointers
atomically, so the concurrent GC won't observe a partially
updated pointer. This CL adds a test.

Change-Id: Icd1124bf3a15ef25bac20c7fb8933f1a642d897c
Reviewed-on: https://go-review.googlesource.com/c/go/+/212627
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Cherry Zhang 2019-12-27 12:02:50 -05:00
parent 822094f047
commit d6bf2d7b83
2 changed files with 70 additions and 0 deletions

View file

@ -45,6 +45,9 @@ var NetpollGenericInit = netpollGenericInit
var ParseRelease = parseRelease
var Memmove = memmove
var MemclrNoHeapPointers = memclrNoHeapPointers
const PreemptMSupported = preemptMSupported
type LFNode struct {