Commit 1c6144d0 authored by Daniel Martí's avatar Daniel Martí

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: 's avatarIan Lance Taylor <iant@golang.org>
parent 031f71ef
...@@ -1478,6 +1478,10 @@ func TestFuzzOneByte(t *testing.T) { ...@@ -1478,6 +1478,10 @@ func TestFuzzOneByte(t *testing.T) {
switch i { switch i {
case 14, 167, 231, 265: // a slice length, corruptions are not handled yet. case 14, 167, 231, 265: // a slice length, corruptions are not handled yet.
continue 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) indices = append(indices, i)
} }
......
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