]> Cypherpunks repositories - gostls13.git/commit
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)
committerKeith Randall <khr@golang.org>
Mon, 22 Apr 2019 17:40:48 +0000 (17:40 +0000)
commit43001a0dc96a29f662f2782c5fb3ca998eadd623
tree0581ae841e67882e556c6e1f18cee1ae759f12c5
parentd1f43ccef7a8285bf3bcd3518d4f38838ce5da1c
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 #31252

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>
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]