]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: avoid fault in heapBitsBulkBarrier
authorRuss Cox <rsc@golang.org>
Mon, 8 Jun 2015 20:22:01 +0000 (13:22 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 8 Jun 2015 20:24:00 +0000 (20:24 +0000)
Change-Id: I0512e461de1f25cb2a1cb7f23e7a77d00700667c
Reviewed-on: https://go-review.googlesource.com/10803
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/mbitmap.go

index 11bfcd1b276bc0cb8fcb1dc1ca98de1f7dae305c..a4090b9a087dae81c9c33674e85453b3f0e38597 100644 (file)
@@ -388,7 +388,7 @@ func heapBitsBulkBarrier(p, size uintptr) {
                // unwinding the stack barriers between the current SP
                // and p's frame.
                gp := getg().m.curg
-               if gp.stack.lo <= p && p < gp.stack.hi {
+               if gp != nil && gp.stack.lo <= p && p < gp.stack.hi {
                        // Run on the system stack to give it more
                        // stack space.
                        systemstack(func() {