)]}'
{
  "commit": "7c4558292c671977645c344ac3b5760cfe11147d",
  "tree": "f8fba1479dec5953f1dd61517e57b3c355201d7e",
  "parents": [
    "dfd7e92aa331f2d584bfefaab2d0432a1bb8c91d"
  ],
  "author": {
    "name": "Nicolas Hillegeer",
    "email": "aktau@google.com",
    "time": "Sat Oct 12 14:59:46 2024 -0700"
  },
  "committer": {
    "name": "Gopher Robot",
    "email": "gobot@golang.org",
    "time": "Mon Oct 14 01:08:16 2024 +0000"
  },
  "message": "internal/gocore: fix large types dereference (Go 1.22+)\n\nviewcore supports Go 1.22+ allocation headers since CL 608475. The CL\ndescription mentions:\n\n\u003e This gets the goroot test passing again, which is a low bar... but\n\u003e it\u0027s something.\n\nThis CL fixes an untested path, and modifies test.go to hit that path by\nallocating a \"large\" object (\u003e32760 bytes). When allocating a large\nobject, viewcore panics:\n\n```\npanic: asking for field of non-struct [recovered]\n        panic: asking for field of non-struct\n\ngoroutine 170 [running]:\ntesting.tRunner.func1.2({0x72ce80, 0x7b86c0})\n        /usr/lib/google-golang/src/testing/testing.go:1632 +0x230\ntesting.tRunner.func1()\n        /usr/lib/google-golang/src/testing/testing.go:1635 +0x35e\npanic({0x72ce80?, 0x7b86c0?})\n        /usr/lib/google-golang/src/runtime/panic.go:785 +0x132\ngolang.org/x/debug/internal/gocore.(*Type).field(...)\n        /usr/local/google/home/aktau/gob/go/debug/internal/gocore/type.go:85\ngolang.org/x/debug/internal/gocore.region.Field(...)\n        /usr/local/google/home/aktau/gob/go/debug/internal/gocore/region.go:163\ngolang.org/x/debug/internal/gocore.(*Process).readSpans(0xc0001fe000, {0xc0001fe000?, 0xc000000f50?, 0xc000000500?}, {0xc000aa0480?, 0x1, 0xc0005d7260?})\n        /usr/local/google/home/aktau/gob/go/debug/internal/gocore/process.go:596 +0x5125\ngolang.org/x/debug/internal/gocore.(*Process).readHeap(0xc0001fe000)\n        /usr/local/google/home/aktau/gob/go/debug/internal/gocore/process.go:254 +0x569\ngolang.org/x/debug/internal/gocore.Core(0xc0001f4000)\n```\n\nIndeed, `largeType` is not a struct, but a pointer to a struct:\n\n```\n// src/runtime/mheap.go\ntype mspan struct {\n\t_    sys.NotInHeap\n\t// ...\n\tlargeType             *_type        // malloc header for large objects.\n}\n```\n\nAdd a `Deref()` operation to fix this. Afterwards, the test does not panic\nanymore. Though no attempt has been made to verify that the results are good.\n\nChange-Id: I3569e5e1fba14a311507944f75e2ee2d27616a15\nReviewed-on: https://go-review.googlesource.com/c/debug/+/619875\nLUCI-TryBot-Result: Go LUCI \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nAuto-Submit: Nicolas Hillegeer \u003caktau@google.com\u003e\nReviewed-by: Michael Knyszek \u003cmknyszek@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1cd14316702e0704a515b5d8b19dc1ed2172bfdf",
      "old_mode": 33188,
      "old_path": "internal/gocore/process.go",
      "new_id": "e93435822acbd01d50758b57f95a8ecaa0ea8ed6",
      "new_mode": 33188,
      "new_path": "internal/gocore/process.go"
    },
    {
      "type": "modify",
      "old_id": "ee0bb304e4e13245121111377ca5cac6a951de76",
      "old_mode": 33188,
      "old_path": "internal/gocore/testdata/coretest/test.go",
      "new_id": "d3ebaf9b95e8e65a7a6d89cbc2d08e47109eda59",
      "new_mode": 33188,
      "new_path": "internal/gocore/testdata/coretest/test.go"
    }
  ]
}
