]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark greyobject go:nowritebarrierrec
authorAustin Clements <austin@google.com>
Tue, 24 Nov 2015 19:03:58 +0000 (14:03 -0500)
committerAustin Clements <austin@google.com>
Tue, 12 Jan 2016 02:01:01 +0000 (02:01 +0000)
It would certainly be a mistake to invoke a write barrier while
greying an object.

Change-Id: I34445a15ab09655ea8a3628a507df56aea61e618
Reviewed-on: https://go-review.googlesource.com/18533
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Rick Hudson <rlh@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/mgcmark.go

index 720fd72ada09948978433a8941e114932284ea92..52545afa2993159fea6baaceaa546e53057584e6 100644 (file)
@@ -1036,7 +1036,7 @@ func shade(b uintptr) {
 // obj is the start of an object with mark mbits.
 // If it isn't already marked, mark it and enqueue into gcw.
 // base and off are for debugging only and could be removed.
-//go:nowritebarrier
+//go:nowritebarrierrec
 func greyobject(obj, base, off uintptr, hbits heapBits, span *mspan, gcw *gcWork) {
        // obj should be start of allocation, and so must be at least pointer-aligned.
        if obj&(sys.PtrSize-1) != 0 {