]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix load of interface{}-typed OpIData in expand_calls
authorDavid Chase <drchase@google.com>
Fri, 13 Nov 2020 21:54:48 +0000 (16:54 -0500)
committerDavid Chase <drchase@google.com>
Sat, 14 Nov 2020 17:24:37 +0000 (17:24 +0000)
commit92c732e901a732855f4b813e6676264421eceae9
tree6fdc0828d5c90fef75e0d916c09818909541a339
parent782cf560db4c919790fdb476d1bbe18e5ddf5ffd
cmd/compile: fix load of interface{}-typed OpIData in expand_calls

In certain cases, the declkared type of an OpIData is interface{}.
This was not expected (since interface{} is a pair, right?) and
thus caused a crash.  What is intended is that these be treated as
a byteptr, so do that instead (this is what happens in 1.15).

Fixes #42568.

Change-Id: Id7c9e5dc2cbb5d7c71c6748832491ea62b0b339f
Reviewed-on: https://go-review.googlesource.com/c/go/+/270057
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/ssa/expand_calls.go
test/fixedbugs/issue42568.go [new file with mode: 0644]