]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.7] cmd/compile: rewrite literal.method to ensure full initialization
authorDavid Chase <drchase@google.com>
Fri, 23 Dec 2016 17:00:07 +0000 (12:00 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 25 Jan 2017 17:17:21 +0000 (17:17 +0000)
commit93468efeb7968071f490656eada6db633f8ffe7b
tree51d99b42c4557cd2b6a293315a67a2d4aa36b4fa
parentf5dd484480276f5d848a8f43b8b451429526b220
[release-branch.go1.7] cmd/compile: rewrite literal.method to ensure full initialization

CALLPART of STRUCTLIT did not check for incomplete initialization
of struct; modify PTRLIT treatment to force zeroing.

Test for structlit, believe this might have also failed for
arraylit.

Fixes #18410.

Change-Id: I511abf8ef850e300996d40568944665714efe1fc
Reviewed-on: https://go-review.googlesource.com/34622
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/35636
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/sinit.go
test/fixedbugs/issue18410.go [new file with mode: 0644]