aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.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/panic.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/panic.go')
-rw-r--r--src/runtime/panic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index 393c7695c7..09278afbed 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -301,7 +301,7 @@ func Goexit() {
continue
}
d.started = true
- reflectcall(unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
+ reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
if gp._defer != d {
throw("bad defer entry in Goexit")
}
@@ -401,7 +401,7 @@ func gopanic(e interface{}) {
d._panic = (*_panic)(noescape((unsafe.Pointer)(&p)))
p.argp = unsafe.Pointer(getargp(0))
- reflectcall(unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
+ reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
p.argp = nil
// reflectcall did not panic. Remove d.