#268 endless loop on unmatched { in makefile

closed-fixed
None
5
2010-02-27
2010-02-26
No

Martin Dorey reported http://bugs.debian.org/571652 as follows:

Test case:

martind@whitewater:/tmp$ echo -n "{" > Makefile
martind@whitewater:/tmp$ /usr/bin/ctags-exuberant Makefile
(doesn't terminate)

Where it gets stuck:

(gdb) bt
#0 0x00007ff276a7d960 in read () from /lib/libc.so.6
#1 0x00007ff276a2bb20 in _IO_file_underflow () from /lib/libc.so.6
#2 0x00007ff276a2d2ee in _IO_default_uflow () from /lib/libc.so.6
#3 0x00007ff276a2878c in getc () from /lib/libc.so.6
#4 0x00000000004175fc in iFileGetLine () at read.c:333
#5 0x0000000000417c38 in fileGetc () at read.c:439
#6 0x0000000000411a69 in nextChar () at make.c:42
#7 0x0000000000411add in skipToMatch (pair=0x6 <Address 0x6 out of bounds>) at make.c:98
#8 0x0000000000411dac in findMakeTags () at make.c:146
#9 0x0000000000415668 in parseFile (fileName=0x7fffffffbe82 "/"...) at parse.c:617
#10 0x0000000000411309 in createTagsForEntry (entryName=0x7fffffffbe82 "/"...) at main.c:303
#11 0x0000000000411870 in main (argc=<value optimized out>, argv=0x7fffffffa608) at main.c:348
(gdb)

Fix attached.

Discussion

  • Colin Watson

    Colin Watson - 2010-02-26
     
  • Elliott Hughes

    Elliott Hughes - 2010-02-27

    fix applied in svn. i've added the test case to the regression tests too. thanks!

     
  • Elliott Hughes

    Elliott Hughes - 2010-02-27
    • assigned_to: nobody --> elliotth
    • status: open --> closed-fixed
     

Log in to post a comment.