From: Russ Cox Date: Sun, 6 Dec 2009 16:18:58 +0000 (-0800) Subject: runtime: disable pointer scan optimization X-Git-Tag: weekly.2009-12-07~12 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ed6fd1bcbe06a69e9469fe59d92840a84b41c07b;p=gostls13.git runtime: disable pointer scan optimization * broken by reflect, gob TBR=r https://golang.org/cl/166077 --- diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c index d5e524e8a4..ba4be331b5 100644 --- a/src/pkg/runtime/slice.c +++ b/src/pkg/runtime/slice.c @@ -21,7 +21,9 @@ runtime·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret) ret.len = nel; ret.cap = cap; - if(t->elem->kind&KindNoPointers) + // TODO(rsc): Disabled because reflect and gob cast []byte + // to data structures with pointers. + if(0 && (t->elem->kind&KindNoPointers)) ret.array = mallocgc(size, RefNoPointers, 1); else ret.array = mal(size);