Commit ed6fd1bc authored by Russ Cox's avatar Russ Cox

runtime: disable pointer scan optimization

  * broken by reflect, gob

TBR=r
https://golang.org/cl/166077
parent 44c1eb6b
...@@ -21,7 +21,9 @@ runtime·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret) ...@@ -21,7 +21,9 @@ runtime·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret)
ret.len = nel; ret.len = nel;
ret.cap = cap; 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); ret.array = mallocgc(size, RefNoPointers, 1);
else else
ret.array = mal(size); ret.array = mal(size);
......
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