]> Cypherpunks repositories - gostls13.git/commit
runtime: fix 1-byte return during x.(T) for 0-byte T
authorRuss Cox <rsc@golang.org>
Tue, 3 Jun 2014 01:06:30 +0000 (21:06 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 3 Jun 2014 01:06:30 +0000 (21:06 -0400)
commitd646040fd13b79f811c85bc7280a71c3493419ec
tree8930af3da23b865fced86fbdb1d42687a12e9789
parent8195ce2b4f430023522f28e6666850bbfb85c31b
runtime: fix 1-byte return during x.(T) for 0-byte T

The 1-byte write was silently clearing a byte on the stack.
If there was another function call with more arguments
in the same stack frame, no harm done.
Otherwise, if the variable at that location was already zero,
no harm done.
Otherwise, problems.

Fixes #8139.

LGTM=dsymonds
R=golang-codereviews, dsymonds
CC=golang-codereviews, iant, r
https://golang.org/cl/100940043
src/pkg/runtime/iface.goc
test/fixedbugs/issue8139.go [new file with mode: 0644]