]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix reentrancy issue in unified IR function body reading
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Mar 2022 04:11:21 +0000 (20:11 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 7 Mar 2022 06:23:18 +0000 (06:23 +0000)
commit7c292ddf1f883698b3a0bab7004368cff62a04a5
tree392a58325c4e69843e2a08947ea39051571c4318
parentda2773fe3e2f6106634673a38dc3a6eb875fe7d8
cmd/compile: fix reentrancy issue in unified IR function body reading

We shouldn't need to read in function bodies for new functions found
during inlining, but something is expecting them to still be read
in. We should fix that code to not depend on them being read in, but
in the mean time reading them in anyway is at least correct, albeit
less efficient in time and space.

Fixes #49536.
Updates #50552.

Change-Id: I949ef45e7be09406e5a8149e251d78e015aca5fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/390335
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/unified.go
test/run.go
test/typeparam/issue49536.dir/a.go [new file with mode: 0644]
test/typeparam/issue49536.dir/b.go [new file with mode: 0644]
test/typeparam/issue49536.go [new file with mode: 0644]