)]}'
{
  "commit": "4d74aab7aa562fe79d4669cdad0c32610531cbc0",
  "tree": "5dc95ed8fd4fc55c369c21cc9942b210b3a47350",
  "parents": [
    "5291ecf9720c97e2a82e8766a642e33529f890d1"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Thu Aug 11 09:51:03 2022 +0930"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Thu Aug 11 12:03:05 2022 +0930"
  },
  "message": "PR29466, APP/NO_APP with .linefile\n\nCommit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could\nresult in losing input.  If scrubbing results in expansion past the\nholding capacity of do_scrub_chars output buffer, then do_scrub_chars\nstashes the extra input for the next call.  That call never came\nbecause sb_scrub_and_add_sb wrongly decided it was done.  Fix that by\nallowing sb_scrub_and_add_sb to see whether there is pending input.\nAlso allow a little extra space so that in most cases we won\u0027t need\nto resize the output buffer.\n\nsb_scrub_and_add_sb also limited output to the size of the input,\nrather than the actual output buffer size.  Fixing that resulted in a\nfail of gas/testsuite/macros/dot with an extra warning: \"end of file\nnot at end of a line; newline inserted\".  OK, so the macro in dot.s\nreally does finish without end-of-line.  Apparently the macro\nexpansion code relied on do_scrub_chars returning early.  So fix that\ntoo by adding a newline if needed in macro_expand_body.\n\n\tPR 29466\n\t* app.c (do_scrub_pending): New function.\n\t* as.h: Declare it.\n\t* input-scrub.c (input_scrub_include_sb): Add extra space for\n\ttwo .linefile directives.\n\t* sb.c (sb_scrub_and_add_sb): Take into account pending input.\n\tAllow output to max.\n\t* macro.c (macro_expand_body): Add terminating newline.\n\t* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.\n\t* testsuite/gas/macros/app5.d,\n\t* testsuite/gas/macros/app5.s: New test.\n\t* testsuite/gas/macros/macros.exp: Run it.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a3ad146625caf8fb5c0a609f7f4bf95c3b91902b",
      "old_mode": 33188,
      "old_path": "gas/app.c",
      "new_id": "096829fd54146b6ed3cb891f67f5442e84ac676e",
      "new_mode": 33188,
      "new_path": "gas/app.c"
    },
    {
      "type": "modify",
      "old_id": "ff665c7581217d0a4bf0b01256c417bf60159727",
      "old_mode": 33188,
      "old_path": "gas/as.h",
      "new_id": "730e134dce67d7f9a711d63e6258e4eb5d15a5a1",
      "new_mode": 33188,
      "new_path": "gas/as.h"
    },
    {
      "type": "modify",
      "old_id": "ec0b007c77a1a8f0f7931d7e79c61882844b7971",
      "old_mode": 33188,
      "old_path": "gas/input-scrub.c",
      "new_id": "44e4bdca521c4f1fc117ab9c0e4f7d3edce9da79",
      "new_mode": 33188,
      "new_path": "gas/input-scrub.c"
    },
    {
      "type": "modify",
      "old_id": "d799ba586e5aa4459a351298e5001d1059710bfd",
      "old_mode": 33188,
      "old_path": "gas/macro.c",
      "new_id": "c2a47684b15d74d1d807a6b167d6535652f20306",
      "new_mode": 33188,
      "new_path": "gas/macro.c"
    },
    {
      "type": "modify",
      "old_id": "c44016a0338fe0447a46a4fd77e94eda377f134f",
      "old_mode": 33188,
      "old_path": "gas/sb.c",
      "new_id": "e83a5f524f80e35a40a8f9000613d47327658857",
      "new_mode": 33188,
      "new_path": "gas/sb.c"
    },
    {
      "type": "modify",
      "old_id": "5a3dda915f77b2808c17d79df65dcbc0da9a4d94",
      "old_mode": 33188,
      "old_path": "gas/testsuite/config/default.exp",
      "new_id": "21859d961d9f9a04eb690ab37174c72d40478d44",
      "new_mode": 33188,
      "new_path": "gas/testsuite/config/default.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0a1483ccc3a3d741faacb13fa268f23407708015",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/macros/app5.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a960ae223ba47f69b033abe50f041584066976f0",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/macros/app5.s"
    },
    {
      "type": "modify",
      "old_id": "915c45d74f6607c414c30143beb45a45428d05c4",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/macros/macros.exp",
      "new_id": "7a45af4a30869ea128a0bda9aa52a01d3ad74707",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/macros/macros.exp"
    }
  ]
}
