commit | 71db9462eb994327a79928fbbaee3f3675458df1 | [log] [tgz] |
---|---|---|
author | Michael Anthony Knyszek <mknyszek@google.com> | Fri Dec 13 20:24:29 2024 +0000 |
committer | Gopher Robot <gobot@golang.org> | Mon Dec 16 13:41:15 2024 -0800 |
tree | 5427bdba38d2605b94965fdd44ba5a9103e674f7 | |
parent | 5f2bbc1069aecbc97fce688b2feafecb0eedfe86 [diff] |
gocore: overhaul roots, expand testing This change overhauls how roots work to prepare for supporting composite values (roots "de-structured" and broken up into pieces, despite representing a single type). It also expands testing a little bit to prevent backsliding from this point. Roots now do not have an address identity at all, and callers do not rely on that fact anymore. They have a forged identity which is useful for some calculations, but otherwise can only be identified by a *Root. Pointers may now be found in composite roots, which is nice, so all destructured values work correctly for the sake of iterating over all pointers. Finally, this fixes a small, old bug in typeObject where the type pointer would be interrogated before we filtered out whether a interface was nil or not. Because we filter dead pointers by making them appear nil, this means we could end up looking at a bogus, clobbered type pointer. (This may be a bug in the compiler's DWARF generation, the type shouldn't be clobbered.) Change-Id: I09217b2070dc6f4bf4b1dbd28d52f570ba61ca4a Reviewed-on: https://go-review.googlesource.com/c/debug/+/635857 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Nicolas Hillegeer <aktau@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
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.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/debug.
The main issue tracker for the debug repository is located at https://go.dev/issues. Prefix your issue with “x/debug:” in the subject line, so it is easy to find.