)]}'
{
  "commit": "dc685a2b72b24234ba5cbc821375c3d2ac4f0409",
  "tree": "942f90141d8ecd5323211d09ae8e9a4b8199ffff",
  "parents": [
    "510ec7992c30f172205792f190e96111a896ba8f"
  ],
  "author": {
    "name": "Claudio DeSouza",
    "email": "cdesouza@chromium.org",
    "time": "Fri Sep 18 11:56:38 2026 +0100"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Sep 28 17:38:47 2026 -0700"
  },
  "message": "gn edit: keep build files alive for warnings\n\nUsing `gn edit` with something like `remove testonly` results in a\nnon-fatal warning if the target does not have such attribute, and that\nwarning is collected in the `EditState` that `RunEditImpl` returns. This\nrun in UaF as every warning is an `Err` whose `Location` points into the\n`InputFile` owned by the `BuildFile` it came from, however with the\nthat list being scoped to `RunEditImpl`, we end up with `RunEdit`\nformatting those warnings using freed memory.\n\nThis CL fixes that by hoisting `build_files_` as a sibling field to\n`edit_state_`.\n\nChange-Id: I12acd0c02f3196c5f122642fadf6be2184769256\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/26700\nReviewed-by: Matt Stark \u003cmsta@google.com\u003e\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "28b21f6698c9d4357556a528d8adbcdc93750caa",
      "old_mode": 33188,
      "old_path": "src/gn/command_suggest.cc",
      "new_id": "07345ca7ab0c6d8bbc803b55a5a4ed0df8552aa6",
      "new_mode": 33188,
      "new_path": "src/gn/command_suggest.cc"
    },
    {
      "type": "modify",
      "old_id": "62d49a372a5c6427350514a0bc1be0e13cbe6904",
      "old_mode": 33188,
      "old_path": "src/gn/edit_command.cc",
      "new_id": "c36647bc55600fff53b940cfd8d4252c4c9512d6",
      "new_mode": 33188,
      "new_path": "src/gn/edit_command.cc"
    },
    {
      "type": "modify",
      "old_id": "c3414d3f2f1e05407ae82df300c9ae9ea2815d50",
      "old_mode": 33188,
      "old_path": "src/gn/edit_command.h",
      "new_id": "f90b255cba742272aa149f9da955f94f018a8b5f",
      "new_mode": 33188,
      "new_path": "src/gn/edit_command.h"
    },
    {
      "type": "modify",
      "old_id": "d61120defe4ec7d5bcc796c2fa018c44669ec3dd",
      "old_mode": 33188,
      "old_path": "src/gn/edit_command_unittest.cc",
      "new_id": "6d7ab077973d65a5e2cdf28e6f6e434252f2b598",
      "new_mode": 33188,
      "new_path": "src/gn/edit_command_unittest.cc"
    }
  ]
}
