aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-12-30 13:59:55 -0500
committerRuss Cox <rsc@golang.org>2015-01-06 00:28:31 +0000
commitdf027aceb970a2e9dcafb6e79f8581efb2f30c86 (patch)
tree081f9fdc55e56f739de4b6e6f32c3f03f979d6fc /src/runtime/malloc.go
parent813386f200e2cc15a05c8e641227e3cadffffc0d (diff)
downloadgo-df027aceb970a2e9dcafb6e79f8581efb2f30c86.tar.xz
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>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go2
1 files changed, 1 insertions, 1 deletions
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