]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: check width of embedded interfaces in expandiface
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 28 Apr 2017 14:28:49 +0000 (07:28 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 28 Apr 2017 20:07:38 +0000 (20:07 +0000)
commit92363d52c038851f4a6773ab5744f6d577ac1d38
tree0e4505834d6c84656603abf556ac94242794663f
parente29ea14100cd4eac22f8aa21ab629d767119707c
cmd/compile: check width of embedded interfaces in expandiface

The code in #20162 contains an embedded interface.

It didn't get dowidth'd by the frontend,
and during DWARF generation, ngotype asked
for a string description of it,
which triggered a request for the number of fields
in the interface, which triggered a dowidth,
which is disallowed in the backend.

The other changes in this CL are to support the test.

Fixes #20162

Change-Id: I4d0be5bd949c361d4cdc89a8ed28b10977e40cf9
Reviewed-on: https://go-review.googlesource.com/42131
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/main.go
test/fixedbugs/issue20162.go [new file with mode: 0644]
test/run.go