From 91658f934d6dc4672fa1e511e37d76b4d5b6c134 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 5 Nov 2014 14:42:24 -0500 Subject: [PATCH] [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 --- src/runtime/mgc0.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/runtime/mgc0.c b/src/runtime/mgc0.c index 77a6c937768..3ebaf005f5b 100644 --- a/src/runtime/mgc0.c +++ b/src/runtime/mgc0.c @@ -326,12 +326,16 @@ objectstart(byte *b, Markbits *mbits) // The following ensures that we are rigorous about what data // structures hold valid pointers - runtime·printf("runtime:objectstart Span weird: obj=%p, k=%p", obj, k); - if (s == nil) - runtime·printf(" s=nil\n"); - else - runtime·printf(" s->start=%p s->limit=%p, s->state=%d\n", s->start*PageSize, s->limit, s->state); - runtime·throw("objectstart: bad span"); + if(0) { + // Still happens sometimes. We don't know why. + runtime·printf("runtime:objectstart Span weird: obj=%p, k=%p", obj, k); + if (s == nil) + runtime·printf(" s=nil\n"); + 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<sizeclass != 0) {