]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.9] reflect: fix pointer past-the-end in Call with zero-sized...
authorCherry Zhang <cherryyz@google.com>
Fri, 1 Sep 2017 02:02:37 +0000 (22:02 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 25 Oct 2017 20:23:00 +0000 (20:23 +0000)
commitff8289f87936bd840daf6e704885f62399d01126
tree1b7e5f68fc7e0b499ca2b5db7977c838e354b5c4
parentbd34e74134645b7a7109dbf0361eb1ceb1c3d1ba
[release-branch.go1.9] reflect: fix pointer past-the-end in Call with zero-sized return value

If a function with nonzero frame but zero-sized return value is
Call'd, we may write a past-the-end pointer in preparing the
return Values. Fix by return the zero value for zero-sized
return value.

Fixes #21717.

Change-Id: I5351cd86d898467170a888b4c3fc9392f0e7aa3b
Reviewed-on: https://go-review.googlesource.com/60811
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/70971
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/reflect/all_test.go
src/reflect/value.go