aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/print.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-10-27 14:15:00 -0700
committerKeith Randall <khr@golang.org>2020-10-27 22:13:30 +0000
commit091257def92b0280b07bde9536b7cdf5f3b02aec (patch)
treeecec5565c36c24ca62600c7aa5a7fa59caf689f4 /src/runtime/print.go
parent009d71409821a6ac4f1b32aaae2c856c20a29f92 (diff)
downloadgo-091257def92b0280b07bde9536b7cdf5f3b02aec.tar.gz
go-091257def92b0280b07bde9536b7cdf5f3b02aec.zip
cmd/compile: print pointers to go:notinheap types without converting to unsafe.Pointer
Pretty minor concern, but after auditing the compiler/runtime for conversions from pointers to go:notinheap types to unsafe.Pointer, this is the only remaining one I found. Update #42076 Change-Id: I81d5b893c9ada2fc19a51c2559262f2e9ff71c35 Reviewed-on: https://go-review.googlesource.com/c/go/+/265757 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/print.go')
-rw-r--r--src/runtime/print.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/print.go b/src/runtime/print.go
index e605eb34cb..64055a34cc 100644
--- a/src/runtime/print.go
+++ b/src/runtime/print.go
@@ -237,6 +237,9 @@ func printhex(v uint64) {
func printpointer(p unsafe.Pointer) {
printhex(uint64(uintptr(p)))
}
+func printuintptr(p uintptr) {
+ printhex(uint64(p))
+}
func printstring(s string) {
gwrite(bytes(s))