diff options
author | Russ Cox <rsc@golang.org> | 2009-02-11 17:54:03 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-02-11 17:54:03 -0800 |
commit | d89426aacb706dba5b305bd29d5e7f67927e3848 (patch) | |
tree | 39eb580e0d3ef2f9f0b7f3cb6047d28b57bda75e /src/runtime/mheap.c | |
parent | a0cfe5c034413449494b330fd538bfdccadb6b2b (diff) | |
download | golang-d89426aacb706dba5b305bd29d5e7f67927e3848.tar.gz |
fix gc bug. i think this is tgs's second bug.
i stumbled across it in all.bash.
TBR=r
OCL=24912
CL=24912
Diffstat (limited to 'src/runtime/mheap.c')
-rw-r--r-- | src/runtime/mheap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/mheap.c b/src/runtime/mheap.c index 64af8e741..362719434 100644 --- a/src/runtime/mheap.c +++ b/src/runtime/mheap.c @@ -228,6 +228,8 @@ MHeap_LookupMaybe(MHeap *h, PageID p) s = MHeapMap_GetMaybe(&h->map, p); if(s == nil || p < s->start || p - s->start >= s->npages) return nil; + if(s->state != MSpanInUse) + return nil; return s; } |