]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: attach OVARLIVE nodes to OCALLxxx
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 11 Sep 2020 18:57:27 +0000 (01:57 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 13 Sep 2020 04:35:22 +0000 (04:35 +0000)
commit1f4521669416a2e14fb0b84481447f4a93f19878
tree79ab90e19e0b300fd1781d89ec05e9a744f3f699
parent95bb00d1088767ed14e3bd1a5f533a690d619a5f
cmd/compile: attach OVARLIVE nodes to OCALLxxx

So we can insert theses OVARLIVE nodes right after OpStaticCall in SSA.

This helps fixing issue that unsafe-uintptr arguments are not kept alive
during return statement, or can be kept alive longer than expected.

Fixes #24491

Change-Id: Ic04a5d1bbb5c90dcfae65bd95cdd1da393a66800
Reviewed-on: https://go-review.googlesource.com/c/go/+/254397
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/syntax.go
test/fixedbugs/issue24491a.go [moved from test/fixedbugs/issue24491.go with 85% similarity]
test/fixedbugs/issue24491b.go [new file with mode: 0644]