Commit 91658f93 authored by Russ Cox's avatar Russ Cox

[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
parent 0584312e
...@@ -326,12 +326,16 @@ objectstart(byte *b, Markbits *mbits) ...@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment