diff options
| author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-01 19:26:59 +0000 |
|---|---|---|
| committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-01 19:26:59 +0000 |
| commit | 86babf4bfda7c2c2e9be4abc20e4d8073e05e5be (patch) | |
| tree | 7e7e6083ebe59999943a211a17f8ef6f07f17c2f /libgo/go/encoding/gob | |
| parent | df9ff8bf53f716508a120d15cc144e628fd2e9b5 (diff) | |
| download | ppe42-gcc-86babf4bfda7c2c2e9be4abc20e4d8073e05e5be.tar.gz ppe42-gcc-86babf4bfda7c2c2e9be4abc20e4d8073e05e5be.zip | |
libgo: Update to weekly.2012-01-27.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183810 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/encoding/gob')
| -rw-r--r-- | libgo/go/encoding/gob/debug.go | 3 | ||||
| -rw-r--r-- | libgo/go/encoding/gob/decoder.go | 4 | ||||
| -rw-r--r-- | libgo/go/encoding/gob/gobencdec_test.go | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/libgo/go/encoding/gob/debug.go b/libgo/go/encoding/gob/debug.go index 4a61d0fb2f8..6dc7fc9aca0 100644 --- a/libgo/go/encoding/gob/debug.go +++ b/libgo/go/encoding/gob/debug.go @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Delete the next line to include this file in the gob package. +// +build ignore + package gob // This file is not normally included in the gob package. Used only for debugging the package itself. diff --git a/libgo/go/encoding/gob/decoder.go b/libgo/go/encoding/gob/decoder.go index 5e684d3ee7e..fb28c8caf53 100644 --- a/libgo/go/encoding/gob/decoder.go +++ b/libgo/go/encoding/gob/decoder.go @@ -75,7 +75,9 @@ func (dec *Decoder) recvMessage() bool { 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 } diff --git a/libgo/go/encoding/gob/gobencdec_test.go b/libgo/go/encoding/gob/gobencdec_test.go index b8dfeeb5156..83644c0331b 100644 --- a/libgo/go/encoding/gob/gobencdec_test.go +++ b/libgo/go/encoding/gob/gobencdec_test.go @@ -547,7 +547,6 @@ func (a isZeroBugArray) GobEncode() (b []byte, e error) { } func (a *isZeroBugArray) GobDecode(data []byte) error { - println("DECODE") if len(data) != len(a) { return io.EOF } |

