]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] cmd/compile: use correct package name for stack object symbol
authorKeith Randall <keithr@alum.mit.edu>
Wed, 10 Apr 2019 23:44:46 +0000 (16:44 -0700)
committerAndrew Bonventre <andybons@golang.org>
Mon, 6 May 2019 18:53:43 +0000 (18:53 +0000)
commita17d091120c26c982ca0cde3ac590f49b08fd196
treeb78b4bfc79defcd224754d789a213adceaae52c5
parentdc6db5f4340675a6c05d03382728d739208d7a3c
[release-branch.go1.12] cmd/compile: use correct package name for stack object symbol

Stack object generation code was always using the local package name
for its symbol. Normally that doesn't matter, as we usually only
compile functions in the local package. But for wrappers, the compiler
generates functions which live in other packages. When there are two
other packages with identical functions to wrap, the same name appears
twice, and the compiler goes boom.

Fixes #31396

Change-Id: I7026eebabe562cb159b8b6046cf656afd336ba25
Reviewed-on: https://go-review.googlesource.com/c/go/+/171464
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
(cherry picked from commit 43001a0dc96a29f662f2782c5fb3ca998eadd623)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/gc/pgen.go
test/fixedbugs/issue31252.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue31252.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue31252.dir/c.go [new file with mode: 0644]
test/fixedbugs/issue31252.dir/main.go [new file with mode: 0644]
test/fixedbugs/issue31252.go [new file with mode: 0644]