]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, runtime: store pointers to go:notinheap types indirectly
authorKeith Randall <khr@golang.org>
Thu, 22 Oct 2020 23:37:19 +0000 (16:37 -0700)
committerKeith Randall <khr@golang.org>
Tue, 27 Oct 2020 21:29:13 +0000 (21:29 +0000)
commit009d71409821a6ac4f1b32aaae2c856c20a29f92
tree3a10a3e6fce63c0d4a4bd5d93f01c100a902afd3
parent933721b8c7f981229974e2603850c2e9a7ffc5a1
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 #42076

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>
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]