aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/gob
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-03-08 18:47:07 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-03-09 18:29:21 +0000
commit1c6144d0699c88e7da2746391836f97fd12642ae (patch)
tree230b952d05e1d7243a21297550be3328ea86b45c /src/encoding/gob
parent031f71efdf1fd72322247a92c2d1a56eac16fd45 (diff)
downloadgo-1c6144d0699c88e7da2746391836f97fd12642ae.tar.gz
go-1c6144d0699c88e7da2746391836f97fd12642ae.zip
encoding/gob: work around TestFuzzOneByte panic
The index 248 results in the decoder calling reflect.MakeMapWithSize with a size of 14754407682 - just under 15GB - which ends up in a runtime out of memory panic after some recent runtime changes on machines with 8GB of memory. Until that is fixed in either runtime or gob, skip the troublesome index. Updates #24308. Change-Id: Ia450217271c983e7386ba2f3f88c9ba50aa346f4 Reviewed-on: https://go-review.googlesource.com/99655 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/gob')
-rw-r--r--src/encoding/gob/codec_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go
index 8f7b6f3c62..520afde34d 100644
--- a/src/encoding/gob/codec_test.go
+++ b/src/encoding/gob/codec_test.go
@@ -1478,6 +1478,10 @@ func TestFuzzOneByte(t *testing.T) {
switch i {
case 14, 167, 231, 265: // a slice length, corruptions are not handled yet.
continue
+ case 248:
+ // Large map size, which currently causes an out of memory panic.
+ // See golang.org/issue/24308 and golang.org/issue/20221.
+ continue
}
indices = append(indices, i)
}