]> Cypherpunks repositories - gostls13.git/commit
gob: protect against pure recursive types.
authorRob Pike <r@golang.org>
Wed, 23 Feb 2011 17:49:35 +0000 (09:49 -0800)
committerRob Pike <r@golang.org>
Wed, 23 Feb 2011 17:49:35 +0000 (09:49 -0800)
commitc9b90c9d70da05269a0de0e528c13b6b76299846
tree61ea1cdc4b230fb78b66073af3b948ca2236ab3c
parentda8e6eec9a69b6de4b75a92797a92fa0c6c8be3e
gob: protect against pure recursive types.

There are further changes required for things like
recursive map types.  Recursive struct types work
but the mechanism needs generalization.  The
case handled in this CL is pathological since it
cannot be represented at all by gob, so it should
be handled separately. (Prior to this CL, encode
would recur forever.)

R=rsc
CC=golang-dev
https://golang.org/cl/4206041
src/pkg/gob/codec_test.go
src/pkg/gob/decode.go
src/pkg/gob/encoder.go
src/pkg/gob/type.go