]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] cmd/compile, runtime: store pointers to go:notinheap types...
authorKeith Randall <khr@golang.org>
Thu, 22 Oct 2020 23:37:19 +0000 (16:37 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 27 Oct 2020 23:05:45 +0000 (23:05 +0000)
commit255afa2461eb45756bbc562d37f5988cc3ca29f7
treef0cdc57c9f0d184f6426f032c4e9bbde6c100ce8
parent8f14c1840d15233b7f3d08f0acf0b0559d465a56
[release-branch.go1.15] cmd/compile, runtime: store pointers to go:notinheap types indirectly

pointers to go:notinheap types should be treated as scalars. That
means they shouldn't be stored directly in interfaces, or directly
in reflect.Value.ptr.

Also be sure to use uintpr to compare such pointers in reflect.DeepEqual.

Fixes #42169

Change-Id: I53735f6d434e9c3108d4940bd1bae14c61ef2a74
Reviewed-on: https://go-review.googlesource.com/c/go/+/264480
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 009d71409821a6ac4f1b32aaae2c856c20a29f92)
Reviewed-on: https://go-review.googlesource.com/c/go/+/265720
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/typecheck.go
src/reflect/deepequal.go
src/reflect/value.go
src/runtime/netpoll.go
test/fixedbugs/issue42076.go [new file with mode: 0644]