From df027aceb970a2e9dcafb6e79f8581efb2f30c86 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 30 Dec 2014 13:59:55 -0500 Subject: 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 --- src/runtime/malloc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/malloc.go') diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 58e770249f..22c0dfe3a4 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -942,7 +942,7 @@ func runfinq() { default: throw("bad kind in runfinq") } - reflectcall(unsafe.Pointer(f.fn), frame, uint32(framesz), uint32(framesz)) + reflectcall(nil, unsafe.Pointer(f.fn), frame, uint32(framesz), uint32(framesz)) // drop finalizer queue references to finalized object f.fn = nil -- cgit v1.3