internal/gocore: support Go 1.22 allocation headers

This change supports Go 1.22 allocation headers by identifying all the
heap pointers when enumerating spans. When looking over each span, we
check to see where the pointer data for each value lives, and then
enumerate all the pointers as needed.

This gets the goroot test passing again, which is a low bar... but it's
something.

While we're here, let's also get rid of a branch that only applied to an
unreleased version of Go 1.22.

Fixes #63359.

Change-Id: Id936a0e3b44d0fb0ec300fe957ac8218212de939
Reviewed-on: https://go-review.googlesource.com/c/debug/+/608475
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
3 files changed
tree: 10dc70d80b86f9dd47a5cea42e9718f9f83e7295
  1. cmd/
  2. dwtest/
  3. internal/
  4. codereview.cfg
  5. CONTRIBUTING.md
  6. go.mod
  7. go.sum
  8. LICENSE
  9. README.md
README.md

Go Debug

Go Reference

This repository holds utilities and libraries for debugging Go programs.

WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the debug repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/debug:” in the subject line, so it is easy to find.