)]}'
{
  "commit": "f6ddbafcf07486a2b1f4e08423fafff241c8a002",
  "tree": "25b301504ba22718df13fb2364c93e0ff7cd640b",
  "parents": [
    "4a7645b73032b41cf78c6d72db6ee34206b4e438"
  ],
  "author": {
    "name": "Michael Pratt",
    "email": "mpratt@google.com",
    "time": "Tue May 27 13:39:11 2025 -0400"
  },
  "committer": {
    "name": "Gopher Robot",
    "email": "gobot@golang.org",
    "time": "Mon Aug 10 13:29:17 2026 -0700"
  },
  "message": "time: detect copies of Timer and Ticker\n\nThe public Timer and Ticker types are only the beginning of the larger\nruntime.timeTimer types. User allocations of the public types will not\ninitialize the runtime-only portion of the type. The existing init bool\nfields allow the methods to detect user allocations and panic.\n\nCopies have a similar problem. If a user copies a valid Timer or Ticker,\nonly the beginning of the actual type is copied and it will not be\nusable [1]. The init bool is not sufficient to detect this, as a copy\nwill copy the bool field. Instead, change the init bool to a self\npointer. If the object is copied, the pointer will no longer match.\n\nAlternatively, we could use a pointer field to a separate runtime type.\nThis would make the type safe to copy. This was the initial approach in\npatch set 1 of CL 568339, but it was changed to avoid the extra\nallocation.\n\n[1] Even if the entire structure was defined in time, copying would\nstill not be safe, as runtime.timeTimer is not safe to copy. e.g., it\ncontains mutex values. This is what CL 568339 was addressing.\n\nFixes #73886.\n\nChange-Id: I6a6a636ce703c0e946aa9ee545f756b60eafff0a\nReviewed-on: https://go-review.googlesource.com/c/go/+/676537\nAuto-Submit: Michael Pratt \u003cmpratt@google.com\u003e\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Ian Lance Taylor \u003ciant@golang.org\u003e\nReviewed-by: Cherry Mui \u003ccherryyz@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6c569b57c2f9c40911fa86d83321d50f8e7f0a7d",
      "old_mode": 33188,
      "old_path": "src/runtime/time.go",
      "new_id": "daf20cf43311975ccff96f4de351c26a4068fc8e",
      "new_mode": 33188,
      "new_path": "src/runtime/time.go"
    },
    {
      "type": "modify",
      "old_id": "92ffe7f8f4eeeaf9457b1e16f0c0373c9fd33d5c",
      "old_mode": 33188,
      "old_path": "src/runtime/time_test.go",
      "new_id": "146946da148acdbba55656c1b102a122a74d2a84",
      "new_mode": 33188,
      "new_path": "src/runtime/time_test.go"
    },
    {
      "type": "modify",
      "old_id": "0f6f42d208d596074759e9bc43a5a08547bbeae7",
      "old_mode": 33188,
      "old_path": "src/time/sleep.go",
      "new_id": "107a47a309729477388523e4779b876ef2753d47",
      "new_mode": 33188,
      "new_path": "src/time/sleep.go"
    },
    {
      "type": "modify",
      "old_id": "11018eb444532d2bc44637a2cbb8484100aad31d",
      "old_mode": 33188,
      "old_path": "src/time/sleep_test.go",
      "new_id": "2dfcf61debbe49f858d5233e82ba9bfb9caac97c",
      "new_mode": 33188,
      "new_path": "src/time/sleep_test.go"
    },
    {
      "type": "modify",
      "old_id": "42cefbcc5379338af0dba4756c7c36095c4467a9",
      "old_mode": 33188,
      "old_path": "src/time/tick.go",
      "new_id": "835b449d69647eacf7775d3ef164502a69f7c9e4",
      "new_mode": 33188,
      "new_path": "src/time/tick.go"
    },
    {
      "type": "modify",
      "old_id": "14ee0932207d108ddf5d14fab25373fa3a3fe391",
      "old_mode": 33188,
      "old_path": "src/time/tick_test.go",
      "new_id": "3d7cae15fb631fe0a141ba0589aedfeccc562635",
      "new_mode": 33188,
      "new_path": "src/time/tick_test.go"
    }
  ]
}
