]> Cypherpunks repositories - gostls13.git/commit
reflect: update Select to panic early on excessive input cases
authorMilan Patel <bicelot3@gmail.com>
Sun, 23 Feb 2020 20:27:05 +0000 (15:27 -0500)
committerIan Lance Taylor <iant@golang.org>
Mon, 24 Feb 2020 16:34:27 +0000 (16:34 +0000)
commit7802b551769c9f39e2b08a13f7ba2b4e5c521f9e
treecc7a4d4749dcb367f674f7e64b44edc994d155b7
parent821b7994826cf8f9f5f66ca35339ffe088dba02d
reflect: update Select to panic early on excessive input cases

The runtime implementation of select has an upper limit on the number of
select cases that are supported in order to maintain low stack memory
usage. Rather than support an arbitrary number of select cases, we've
opted to panic early with a useful message pointing the user directly
at the problem.

Fixes #37350

Change-Id: Id129ba281ae120387e681ef96be8adcf89725840
Reviewed-on: https://go-review.googlesource.com/c/go/+/220583
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/reflect/all_test.go
src/reflect/value.go
src/runtime/select.go