]> Cypherpunks repositories - gostls13.git/commit
reflect: fix unsafe conversions reported by -d=checkptr
authorMatthew Dempsky <mdempsky@google.com>
Tue, 22 Oct 2019 00:45:59 +0000 (17:45 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 22 Oct 2019 18:09:15 +0000 (18:09 +0000)
commit5eec0a91eadd76a45197ee2588306bdc85570549
tree93f80eeb7ba8e3db9b52c08325ce37c502feca45
parenta97ccc894032d646e3003f061704ca59cac2587f
reflect: fix unsafe conversions reported by -d=checkptr

The code for generating gcdata was (technically) unsafe. It was also
rather repetitive. This CL refactors it a bit and abstracts use of
gcdata into a helper gcSlice method.

Updates #34972.

Change-Id: Ie86d7822eafe263f1d3d150eedf0ec66be1ec85d
Reviewed-on: https://go-review.googlesource.com/c/go/+/202582
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/reflect/export_test.go
src/reflect/type.go