Commit 27df2e3f authored by Austin Clements's avatar Austin Clements

runtime: mark greyobject go:nowritebarrierrec

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: 's avatarRick Hudson <rlh@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7b1f055e
...@@ -1036,7 +1036,7 @@ func shade(b uintptr) { ...@@ -1036,7 +1036,7 @@ func shade(b uintptr) {
// obj is the start of an object with mark mbits. // obj is the start of an object with mark mbits.
// If it isn't already marked, mark it and enqueue into gcw. // If it isn't already marked, mark it and enqueue into gcw.
// base and off are for debugging only and could be removed. // 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) { 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. // obj should be start of allocation, and so must be at least pointer-aligned.
if obj&(sys.PtrSize-1) != 0 { if obj&(sys.PtrSize-1) != 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment