]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix gccheckmark mode and enable by default
authorRuss Cox <rsc@golang.org>
Thu, 7 May 2015 19:29:48 +0000 (15:29 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 7 May 2015 21:08:29 +0000 (21:08 +0000)
It was testing the mark bits on what roots pointed at,
but not the remainder of the live heap, because in
CL 2991 I accidentally inverted this check during
refactoring.

The next CL will turn it back off by default again,
but I want one run on the builders with the full
checkmark checks.

Change-Id: Ic166458cea25c0a56e5387fc527cb166ff2e5ada
Reviewed-on: https://go-review.googlesource.com/9824
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mgcmark.go
src/runtime/runtime1.go

index f69166ee2237ec871fe0d45ae2c7d89b0017fca0..9d78ddecae4f52b6efc844bea4c34d776aee44d6 100644 (file)
@@ -673,7 +673,7 @@ func greyobject(obj, base, off uintptr, hbits heapBits, span *mspan, gcw *gcWork
 
                        throw("checkmark found unmarked object")
                }
-               if !hbits.isCheckmarked() {
+               if hbits.isCheckmarked() {
                        return
                }
                hbits.setCheckmarked()
index ea3883018b10280a589493945c72599a08d5f898..3bf0b95f6d93f318d0f2c708992bd61db0bdf15c 100644 (file)
@@ -336,6 +336,7 @@ var dbgvars = []dbgVar{
 }
 
 func parsedebugvars() {
+       debug.gccheckmark=1
        for p := gogetenv("GODEBUG"); p != ""; {
                field := ""
                i := index(p, ",")