]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: disable pointer scan optimization
authorRuss Cox <rsc@golang.org>
Sun, 6 Dec 2009 16:18:58 +0000 (08:18 -0800)
committerRuss Cox <rsc@golang.org>
Sun, 6 Dec 2009 16:18:58 +0000 (08:18 -0800)
  * broken by reflect, gob

TBR=r
https://golang.org/cl/166077

src/pkg/runtime/slice.c

index d5e524e8a456be583665cb11fcf6a04544548b53..ba4be331b56bb1d1499eb8406ad721d93a391bd0 100644 (file)
@@ -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);