Package: exuberant-ctags Version: 1:5.7-4 Severity: normal Tags: patch Test case:
mart...@whitewater:/tmp$ echo -n "{" > Makefile mart...@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. -- System Information: Debian Release: 5.0.4 APT prefers oldstable APT policy: (500, 'oldstable'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages exuberant-ctags depends on: ii libc6 2.7-18lenny2 GNU C Library: Shared libraries exuberant-ctags recommends no packages. Versions of packages exuberant-ctags suggests: ii vim 1:7.1.314-3+lenny2 Vi IMproved - enhanced vi editor -- no debconf information
--- make.c 2010-02-26 11:03:17.000000000 -0800 +++ make.c.new 2010-02-26 11:03:13.000000000 -0800 @@ -100,7 +100,7 @@ ++matchLevel; else if (c == end) --matchLevel; - else if (c == '\n') + else if (c == '\n' || c == EOF) break; } if (c == EOF)