)]}'
{
  "commit": "93220e7e06473a11bf48fee26bcea16cc527e5dc",
  "tree": "3990f404a6dd4c541f8bab2a280e16086fd4ed37",
  "parents": [
    "10fb5d2b4be54c779eda80b65a737b9dae2d959b"
  ],
  "author": {
    "name": "Matt Arsenault",
    "email": "Matthew.Arsenault@amd.com",
    "time": "Mon Jan 06 23:12:55 2025 +0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jan 06 23:12:55 2025 +0700"
  },
  "message": "RegAllocGreedy: Fix use after free during last chance recoloring (#120697)\n\nLast chance recoloring can delete the current fixed interval\nduring recursive assignment of interfering live intervals. Check\nif the virtual register value was assigned before attempting the\nunassignment, as is done in other scenarios. This relies on the fact\nthat we do not recycle virtual register numbers.\n\nI have only seen this occur in error situations where the allocation\nwill fail, but I think this can theoretically happen in working\nallocations.\n\nThis feels very brute force, but I\u0027ve spent over a week debugging\nthis and this is what works without any lit regressions. The surprising\npiece to me was that unspillable live ranges may be spilled, and\na number of tests rely on optimizations occurring on them. My other\nattempts to fixed this mostly revolved around not identifying unspillable\nlive ranges as snippet copies. I\u0027ve also discovered we\u0027re making some\nunproductive live range splits with subranges. If we avoid such splits,\nsome of the unspillable copies disappear but mandating that be precise\nto fix a use after free doesn\u0027t sound right.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "95a7801c372f7a01b56c4909e11e893dc53a4492",
      "old_mode": 33188,
      "old_path": "llvm/lib/CodeGen/RegAllocGreedy.cpp",
      "new_id": "e61dad5cf64d08978367f720625f8baf25634364",
      "new_mode": 33188,
      "new_path": "llvm/lib/CodeGen/RegAllocGreedy.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "503f27edf70df276e3676551f9e87ff75f64d946",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AMDGPU/inflated-reg-class-snippet-copy-use-after-free.mir"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3135e3c60f5f111f9ac0fc7dbbd2727e0acb46e4",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AMDGPU/swdev502267-use-after-free-last-chance-recoloring-alloc-succeeds.mir"
    }
  ]
}
