)]}'
{
  "commit": "9c9e880fe150c27e742bfabe9c145feef7e5928f",
  "tree": "0339407bef2f7401697fe815b8a63fd406e8049d",
  "parents": [
    "c433e4242e764544fe8e9ad4c5127a88f1f460a4"
  ],
  "author": {
    "name": "Derek Parker",
    "email": "parkerderek86@gmail.com",
    "time": "Mon Jun 22 09:51:15 2026 -0700"
  },
  "committer": {
    "name": "Keith Randall",
    "email": "khr@golang.org",
    "time": "Tue Jun 23 13:07:44 2026 -0700"
  },
  "message": "cmd/compile: don\u0027t require Heapaddr for heap vars in dead code\n\nDWARF generation\u0027s createConservativeVar asserts that every variable\nmarked ir.EscHeap has a non-nil Heapaddr. This assumption only holds for\nreachable declarations.\n\nEscape analysis runs before SSA generation and is not reachability-aware,\nso it can mark a variable declared in dead code as heap-escaped. During\nSSA generation the ODCL for such a variable lands in an unreachable block,\nwhere stmt() returns early and never calls newHeapaddr. The variable is\ntherefore left with Esc()\u003d\u003dEscHeap but Heapaddr\u003d\u003dnil, a legitimate state:\nthe allocation was never generated, so there is no heap address to point\nat.\n\nOnly build the heap-deref location list when Heapaddr is present, and\notherwise emit a conservative variable with no location list, as was done\nbefore CL 684377. A reachable heap-escaped variable always gets a Heapaddr\nvia newHeapaddr, so a nil Heapaddr uniquely identifies the dead-code case.\n\nFixes #80097.\n\nChange-Id: I91e475d0256c0f5e4d2dfabcacff92904469087a\nReviewed-on: https://go-review.googlesource.com/c/go/+/792960\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Cherry Mui \u003ccherryyz@google.com\u003e\nReviewed-by: Keith Randall \u003ckhr@google.com\u003e\nReviewed-by: Keith Randall \u003ckhr@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "79bf550cb1ec6872f309695dbcecffc4674eae08",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/dwarfgen/dwarf.go",
      "new_id": "3f654fabee7e97561d2c2565d2d3828f9ca6d12d",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/dwarfgen/dwarf.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "314a84f6a447d72d435e5159f2d94120604727bf",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/issue80097.go"
    }
  ]
}
