runtime: avoid fault in heapBitsBulkBarrier

Change-Id: I0512e461de1f25cb2a1cb7f23e7a77d00700667c
Reviewed-on: https://go-review.googlesource.com/10803
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Russ Cox 2015-06-08 13:22:01 -07:00
parent a58e731287
commit 433c0bc769
1 changed files with 1 additions and 1 deletions

View 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() {