[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/29466] APP/NO_APP with linefile
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug gas/29466] APP/NO_APP with linefile |
Date: |
Thu, 11 Aug 2022 07:01:19 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29466
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The binutils-2_39-branch branch has been updated by Alan Modra
<amodra@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9e855cffa1fda44629e7f9b76dfa3e5a51a440e9
commit 9e855cffa1fda44629e7f9b76dfa3e5a51a440e9
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 11 09:51:03 2022 +0930
PR29466, APP/NO_APP with .linefile
Commit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could
result in losing input. If scrubbing results in expansion past the
holding capacity of do_scrub_chars output buffer, then do_scrub_chars
stashes the extra input for the next call. That call never came
because sb_scrub_and_add_sb wrongly decided it was done. Fix that by
allowing sb_scrub_and_add_sb to see whether there is pending input.
Also allow a little extra space so that in most cases we won't need
to resize the output buffer.
sb_scrub_and_add_sb also limited output to the size of the input,
rather than the actual output buffer size. Fixing that resulted in a
fail of gas/testsuite/macros/dot with an extra warning: "end of file
not at end of a line; newline inserted". OK, so the macro in dot.s
really does finish without end-of-line. Apparently the macro
expansion code relied on do_scrub_chars returning early. So fix that
too by adding a newline if needed in macro_expand_body.
PR 29466
* app.c (do_scrub_pending): New function.
* as.h: Declare it.
* input-scrub.c (input_scrub_include_sb): Add extra space for
two .linefile directives.
* sb.c (sb_scrub_and_add_sb): Take into account pending input.
Allow output to max.
* macro.c (macro_expand_body): Add terminating newline.
* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.
* testsuite/gas/macros/app5.d,
* testsuite/gas/macros/app5.s: New test.
* testsuite/gas/macros/macros.exp: Run it.
(cherry picked from commit 4d74aab7aa562fe79d4669cdad0c32610531cbc0)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/29466] New: [2.39 regression] 2.39 broke gas for vax-linux, mikpelinux at gmail dot com, 2022/08/10
- [Bug gas/29466] [2.39 regression] 2.39 broke gas for vax-linux, amodra at gmail dot com, 2022/08/10
- [Bug gas/29466] APP/NO_APP with linefile, amodra at gmail dot com, 2022/08/10
- [Bug gas/29466] APP/NO_APP with linefile, cvs-commit at gcc dot gnu.org, 2022/08/11
- [Bug gas/29466] APP/NO_APP with linefile,
cvs-commit at gcc dot gnu.org <=
- [Bug gas/29466] APP/NO_APP with linefile, amodra at gmail dot com, 2022/08/11
- [Bug gas/29466] APP/NO_APP with linefile, mikpelinux at gmail dot com, 2022/08/11
- [Bug gas/29466] APP/NO_APP with linefile, bergner at linux dot ibm.com, 2022/08/29