It was 2^31, but that could cause overflow and trouble.
Reduce it to 2^30 and add a TODO.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
5562049
dec.err = err
return false
}
- if nbytes >= 1<<31 {
+ // Upper limit of 1GB, allowing room to grow a little without overflow.
+ // TODO: We might want more control over this limit.
+ if nbytes >= 1<<30 {
dec.err = errBadCount
return false
}
}
func (a *isZeroBugArray) GobDecode(data []byte) error {
- println("DECODE")
if len(data) != len(a) {
return io.EOF
}