diff options
author | Alan Modra <amodra@gmail.com> | 2018-01-31 13:34:18 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-01-31 16:58:26 +1030 |
commit | ab1fadc6b2f057b817e1fc093650b63d9f6dd6c5 (patch) | |
tree | e55f2c97682850714204488b0b4bcd859f416ac6 /gas/flonum-mult.c | |
parent | 29236ca20ad953ead58ab791ec376ee7921624b8 (diff) | |
download | gdb-ab1fadc6b2f057b817e1fc093650b63d9f6dd6c5.zip gdb-ab1fadc6b2f057b817e1fc093650b63d9f6dd6c5.tar.gz gdb-ab1fadc6b2f057b817e1fc093650b63d9f6dd6c5.tar.bz2 |
PR22714, Assembler preprocessor loses track of \@
The PR22714 testcase is such that the input buffer processed by
do_scrub_chars ends on this line
1: bug "Returning to usermode but unexpected PSR bits set?", \@
right at the backslash. (The line is part of a macro definition.)
The next input buffer then starts with '@' which starts a comment on
ARM, and the check for \@ fails due to to == tostart. Now it would be
possible to simply access to[-1] in this particular case, but that's
ugly, and to be absolutely safe from people deliberately trying to
crash gas we'd need the read.c:read_a_source_file buffer passed to
do_scrub_chars to have a single byte pad at the start.
PR 22714
* app.c (last_char): New static var.
(struct app_save): Add last_char field.
(app_push, app_pop): Handle it.
(do_scrub_chars): Use last_char in test for "\@". Set last_char.
Diffstat (limited to 'gas/flonum-mult.c')
0 files changed, 0 insertions, 0 deletions