From 0320616db9e21fd8811a2189a56f234b9737f95f Mon Sep 17 00:00:00 2001
From: zhangyunhao <zhangyunhao116@gmail.com>
Date: Thu, 15 Aug 2024 10:04:00 +0000
Subject: [PATCH] runtime: use .Pointers() instead of .PtrBytes != 0

Change-Id: I512808d3cf91466eb6f2c21b49b39ff2e08a9b8c
Reviewed-on: https://go-review.googlesource.com/c/go/+/605498
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
---
 src/runtime/heapdump.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index 95fb62dc425..8f2ae34f4da 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -205,7 +205,7 @@ func dumptype(t *_type) {
 		dwritebyte('.')
 		dwrite(unsafe.Pointer(unsafe.StringData(name)), uintptr(len(name)))
 	}
-	dumpbool(t.Kind_&abi.KindDirectIface == 0 || t.PtrBytes != 0)
+	dumpbool(t.Kind_&abi.KindDirectIface == 0 || t.Pointers())
 }
 
 // dump an object.
-- 
GitLab