[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/28979] Internal error in demand_empty_rest_of_line
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug gas/28979] Internal error in demand_empty_rest_of_line |
Date: |
Sun, 20 Mar 2022 12:44:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28979
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bdcd45685beb9d4b865c68152e47601c7e3d170c
commit bdcd45685beb9d4b865c68152e47601c7e3d170c
Author: Alan Modra <amodra@gmail.com>
Date: Sun Mar 20 18:08:38 2022 +1030
PR28979, internal error in demand_empty_rest_of_line
The change in read_a_source_file prevents the particular testcase in
the PR from triggering the assertion in demand_empty_rest_of_line.
I've also removed the assertion. Nothing much goes wrong with gas if
something else triggers it, so it's not worthy of an abort.
I've also changed my previous patch to ignore_rest_of_line to allow
that function to increment input_line_pointer past buffer_limit, like
demand_empty_rest_of_line: The two functions ought to behave the
same in that respect. Finally, demand_empty_rest_of_line gets a
little hardening to prevent accesses past buffer_limit plus one.
PR 28979
* read.c (read_a_source_file): Calculate known size for sbuf
rather than calling strlen.
(demand_empty_rest_of_line): Remove "know" check. Expand comment.
Don't dereference input_line_pointer when past buffer_limit.
(ignore_rest_of_line): Allow input_line_pointer to increment to
buffer_limit plus one. Expand comment.
--
You are receiving this mail because:
You are on the CC list for the bug.