]> Cypherpunks repositories - gostls13.git/commit
reflect: add write barriers
authorRuss Cox <rsc@golang.org>
Tue, 30 Dec 2014 18:59:55 +0000 (13:59 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 6 Jan 2015 00:28:31 +0000 (00:28 +0000)
commitdf027aceb970a2e9dcafb6e79f8581efb2f30c86
tree081f9fdc55e56f739de4b6e6f32c3f03f979d6fc
parent813386f200e2cc15a05c8e641227e3cadffffc0d
reflect: add write barriers

Use typedmemmove, typedslicecopy, and adjust reflect.call
to execute the necessary write barriers.

Found with GODEBUG=wbshadow=2 mode.
Eventually that will run automatically, but right now
it still detects other missing write barriers.

Change-Id: Iec5b5b0c1be5589295e28e5228e37f1a92e07742
Reviewed-on: https://go-review.googlesource.com/2312
Reviewed-by: Keith Randall <khr@golang.org>
12 files changed:
misc/cgo/test/callback.go
src/reflect/value.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_ppc64x.s
src/runtime/cgocall.go
src/runtime/malloc.go
src/runtime/mgc0.go
src/runtime/panic.go
src/runtime/stubs.go