1
0
mirror of https://github.com/golang/go synced 2024-11-23 08:20:05 -07:00

[dev.garbage] runtime: ignore objects in dead spans

We still don't know why this is happening.

LGTM=rlh
R=rlh
CC=golang-codereviews
https://golang.org/cl/169990043
This commit is contained in:
Russ Cox 2014-11-05 14:42:24 -05:00
parent 0584312e7d
commit 91658f934d

View File

@ -326,12 +326,16 @@ objectstart(byte *b, Markbits *mbits)
// The following ensures that we are rigorous about what data // The following ensures that we are rigorous about what data
// structures hold valid pointers // structures hold valid pointers
runtime·printf("runtime:objectstart Span weird: obj=%p, k=%p", obj, k); if(0) {
if (s == nil) // Still happens sometimes. We don't know why.
runtime·printf(" s=nil\n"); runtime·printf("runtime:objectstart Span weird: obj=%p, k=%p", obj, k);
else if (s == nil)
runtime·printf(" s->start=%p s->limit=%p, s->state=%d\n", s->start*PageSize, s->limit, s->state); runtime·printf(" s=nil\n");
runtime·throw("objectstart: bad span"); else
runtime·printf(" s->start=%p s->limit=%p, s->state=%d\n", s->start*PageSize, s->limit, s->state);
runtime·throw("objectstart: bad pointer in unexpected span");
}
return nil;
} }
p = (byte*)((uintptr)s->start<<PageShift); p = (byte*)((uintptr)s->start<<PageShift);
if(s->sizeclass != 0) { if(s->sizeclass != 0) {