)]}'
{
  "commit": "f57140990f9be3232ffbc708fb1aade032052c80",
  "tree": "d189ac35c8ddb88c775e61a68addf7507469340b",
  "parents": [
    "478e490a4df79436d678ca5f5f1d7c7ac7befa79"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Tue Mar 03 20:27:36 2020 +1030"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Tue Mar 03 21:45:01 2020 +1030"
  },
  "message": "bfd_check_format_matches preserving matches vs. cleanups\n\nIt didn\u0027t take long for oss-fuzz to find double frees due to a bug in\nthe cleanup logic.  It\u0027s seen when reading in any alpha-vms object\nfile except when alpha_vms_vec is the default.  But alpha_vms_vec is\nof course the default when building for --target\u003dalpha-dec-vms (and\nnaturally what I used to  test the cleanup support since that is the\nonly target with a cleanup that does anything currently).\n\nAnyway, the bug is that if bfd_check_format_matches is to preserve a\nmatch the cleanup for that match can\u0027t be run.  Quite obviously that\nwould destroy part of the match state.\n\n\t* format.c (struct bfd_preserve): Add cleanup field.\n\t(bfd_preserve_save): Add cleanup param and save.\n\t(bfd_preserve_restore): Return cleanup.\n\t(bfd_preserve_finish): Call the cleanup for the discarded match.\n\t(bfd_check_format_matches): Pass cleanup to bfd_preserve_save,\n\tand clear when preserving a match.  Restore cleanup too when\n\trestoring that match.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1f9e20581fe1194f52a4ef4bd28401611d5a6739",
      "old_mode": 33188,
      "old_path": "bfd/ChangeLog",
      "new_id": "ff2881f966fe4444ed4febd3f543ddad75220203",
      "new_mode": 33188,
      "new_path": "bfd/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "b181742f3b1699660b4e493f60f81bc6dc7ca757",
      "old_mode": 33188,
      "old_path": "bfd/format.c",
      "new_id": "61f26c6042ae3b3f957951c793cae12d1b1e3811",
      "new_mode": 33188,
      "new_path": "bfd/format.c"
    }
  ]
}
