]> Cypherpunks repositories - gostls13.git/commit
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)
committerDavid Chase <drchase@google.com>
Fri, 6 Jan 2017 20:35:52 +0000 (20:35 +0000)
commit41d2278eef7a834c0c5191c479a1ba4934c7ec0a
treebf361c1e7288c9775429266aabfbc476c6015c30
parenta37b9e8e70fd8e614caa6077b3b8afb488f7f59e
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>
src/cmd/compile/internal/gc/sinit.go
test/fixedbugs/issue18410.go [new file with mode: 0644]