aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2016-12-07 22:25:41 -0800
committerJoe Tsai <thebrokentoaster@gmail.com>2016-12-08 17:29:33 +0000
commit291254414b2adcea8e36374c6dbcdb3d9ede06c5 (patch)
treeb649a45f0e533203f8f11177637e85dcc2e4c7a5 /src/database/sql
parentd4b46aa1b8c2e62b1e13de15741c7330fd2e9e3a (diff)
downloadgo-291254414b2adcea8e36374c6dbcdb3d9ede06c5.tar.xz
io: fix MultiReader panic on nil reader.
The combination of two prior CLs can cause panics: * CL/17873: make chained multiReader Read more efficient * CL/28533: make MultiReader nil exhausted Readers for earlier GC The first CL allows MultiReader to "inherit" another MultiReader's list of Readers for efficiency reasons. This is problematic when combined with the later CL since that can set prior Readers in that list to nil for GC reasons. This causes panics when two MultiReaders are used together (even synchronously). To fix this, rather than setting consumed Readers as nil, we set them with a special eofReader that always returns EOF. Fixes #18232 Change-Id: I2a9357ab217e3d54d38ea9022d18e4d14f4182d3 Reviewed-on: https://go-review.googlesource.com/34140 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions