assembler skipping \ chars
H. J. Lu
hjl@lucon.org
Sun May 27 17:35:00 GMT 2007
On Sun, May 27, 2007 at 06:30:01PM +0100, Nathan Sidwell wrote:
> The assembler skips \ chars if they appear in certain positions of the
> input file :(
>
> This is occurring in do_scrub_chars, where we fill an input buffer (usually
> 32768 chars at a time). In some states we'll emit ' \' instead of '\'.
> Unfortunately, if we're at the end of the input buffer, the PUT (' ')
> causes us to exit do_scrub_chars, without saving the '\' character.
>
> This patch changes do_scrub_chars to check whether we're near the end of
> the input buffer before trying to emit the ' \' sequence. If we are, we
> UNGET the '\' and exit immediately.
>
> Our user had the unfortunate case where a macro was appearing near the end
> of an input chunk such that an arg use triggered this bug, leading to
> confusing error messages.
>
> ok?
Can you add a testcase?
H.J.
More information about the Binutils
mailing list