mirror of
https://github.com/golang/go.git
synced 2025-10-31 16:50:58 +00:00
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>
This commit is contained in:
parent
813386f200
commit
df027aceb9
12 changed files with 266 additions and 96 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue