]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/staticinit: fix panic in interface conversion
authorSung Yoon Whang <sungyoon@uber.com>
Wed, 8 Feb 2023 22:35:30 +0000 (22:35 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 9 Feb 2023 15:21:37 +0000 (15:21 +0000)
commit3161081c12bd7e852a60b836476ad9c3b44037d3
treed0d3f35c30e1cbb4b8484deb692c613d0c0db52d
parentf3e0f1c077c778104bc1b56a490f4233569b87a9
cmd/compile/internal/staticinit: fix panic in interface conversion

This patch fixes a panic from incorrect interface conversion from
*ir.BasicLit to *ir.ConstExpr. This only occurs when nounified
GOEXPERIMENT is set, so ideally it should be backported to Go
1.20 and removed from master.

Fixes #58339

Change-Id: I357069d7ee1707d5cc6811bd2fbdd7b0456323ae
GitHub-Last-Rev: 641dedb5f9f95e6f8d46723d445a8c9609719ce4
GitHub-Pull-Request: golang/go#58389
Reviewed-on: https://go-review.googlesource.com/c/go/+/466175
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/staticinit/sched.go
test/fixedbugs/issue58339.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue58339.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue58339.go [new file with mode: 0644]