]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/compile: fix mishandling of unsafe-uintptr arguments...
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 26 Feb 2021 03:17:09 +0000 (10:17 +0700)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 1 Mar 2021 20:38:01 +0000 (20:38 +0000)
commitca9cd629fb0609c9a2b6f6bf91ac6c6d33071be6
treeb00e3382357e59f44a1db9eb6edb88a6bd5b1b42
parent18e5d75ffb3c8d2be8c92f801aded70321e0b84b
[release-branch.go1.16] cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer

In CL 253457, we did the same fix for direct function calls. But for
method calls, the receiver argument also need to be passed through the
wrapper function, which we are not doing so the compiler crashes with
the code in #44415.

It will be nicer if we can rewrite OCALLMETHOD to normal OCALLFUNC, but
that will be for future CL. The passing receiver argument to wrapper
function is easier for backporting to go1.16 branch.

Fixes #44464

Change-Id: I03607a64429042c6066ce673931db9769deb3124
Reviewed-on: https://go-review.googlesource.com/c/go/+/296490
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/296769
Trust: Bryan C. Mills <bcmills@google.com>
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue24491a.go