]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix -d=checkptr for named unsafe.Pointer types
authorMatthew Dempsky <mdempsky@google.com>
Thu, 17 Oct 2019 20:16:15 +0000 (13:16 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 17 Oct 2019 21:10:22 +0000 (21:10 +0000)
commitf9226454b9830dd7fe6405bdb2953a6747dce41b
tree69cdc1629e5d00d57f2d870fdb484f373164bcf1
parent58e8f7897a0b69fee891af8461e1270d59f4d1a6
cmd/compile: fix -d=checkptr for named unsafe.Pointer types

We need to explicitly convert pointers to unsafe.Pointer before
passing to the runtime checkptr instrumentation in case the user
declared their own type with underlying type unsafe.Pointer.

Updates #22218.
Fixes #34966.

Change-Id: I3baa2809d77f8257167cd78f57156f819130baa8
Reviewed-on: https://go-review.googlesource.com/c/go/+/201782
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue34966.go [new file with mode: 0644]