mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
PR24827, Linker loops forever if unterminated multi-line comment in script
YY_INPUT returns 0 on end of input, not EOF. PR 24827 * ldlex.l (comment): Check for 0 return from input(), not EOF.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2019-07-20 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 24827
|
||||||
|
* ldlex.l (comment): Check for 0 return from YY_INPUT, not EOF.
|
||||||
|
|
||||||
2019-07-19 Alan Modra <amodra@gmail.com>
|
2019-07-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* testsuite/ld-powerpc/tlsgd.d,
|
* testsuite/ld-powerpc/tlsgd.d,
|
||||||
|
@ -675,7 +675,7 @@ comment (void)
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
c = input();
|
c = input();
|
||||||
while (c != '*' && c != EOF)
|
while (c != '*' && c != 0)
|
||||||
{
|
{
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
lineno++;
|
lineno++;
|
||||||
@ -694,7 +694,7 @@ comment (void)
|
|||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
lineno++;
|
lineno++;
|
||||||
|
|
||||||
if (c == EOF)
|
if (c == 0)
|
||||||
{
|
{
|
||||||
einfo (_("%F%P: EOF in comment\n"));
|
einfo (_("%F%P: EOF in comment\n"));
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user