summaryrefslogtreecommitdiff
path: root/src/runtime/mgc0.c
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
committerTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
commit839657a730bd3c82d1b7932f996dd87448eb7d38 (patch)
treed46006c2df507ba8cfd57a47169d326349b5c749 /src/runtime/mgc0.c
parent90ad8a7e5881be7834909c649f994b6b5244c965 (diff)
downloadgolang-upstream-sid.tar.gz
Imported Upstream version 1.4.2upstream/1.4.2upstream-sid
Diffstat (limited to 'src/runtime/mgc0.c')
-rw-r--r--src/runtime/mgc0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/mgc0.c b/src/runtime/mgc0.c
index 7754bad89..083beec22 100644
--- a/src/runtime/mgc0.c
+++ b/src/runtime/mgc0.c
@@ -350,6 +350,9 @@ scanblock(byte *b, uintptr n, byte *ptrmask)
x -= (uintptr)arena_start>>PageShift;
s = runtime·mheap.spans[x];
if(s == nil || k < s->start || obj >= s->limit || s->state != MSpanInUse) {
+ // Sometimes 32-bit heaps have holes. See issue 9872
+ if(PtrSize == 4 && s == nil)
+ continue;
// Stack pointers lie within the arena bounds but are not part of the GC heap.
// Ignore them.
if(s != nil && s->state == MSpanStack)