From 091257def92b0280b07bde9536b7cdf5f3b02aec Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 27 Oct 2020 14:15:00 -0700 Subject: 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 Run-TryBot: Keith Randall TryBot-Result: Go Bot Reviewed-by: Matthew Dempsky --- src/runtime/print.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/runtime/print.go') 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)) -- cgit v1.3