Package: cscope Version: 15.5+cvs20050816-1 Severity: important Tags: patch
Using current kbuild.git tree (or any -mm patch in 2.6.16-rc1 -maybe earlier mm also-) I get a segfault in 'make cscope'. I tracked this to be caused by: VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b cscope dies because of the trailing ':' in: (gdb) bt #0 0xb7e45cd3 in strlen () from /lib/tls/libc.so.6 #1 0x0805be0c in vpinit (current_dir=0x80a6460 "/home/mattia/devel/kernel/git/linux-2.6") at vpinit.c:126 #2 0x0805267e in makevpsrcdirs () at dir.c:98 #3 0x080533a1 in makefilelist () at dir.c:276 #4 0x0805a70b in main (argc=0, argv=0xbffb6148) at main.c:538 the attached patch fixes the segfault. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (300, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-rc2-mm1-3 Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) Versions of packages cscope depends on: ii libc6 2.3.5-13 GNU C Library: Shared libraries an ii libncurses5 5.5-1 Shared libraries for terminal hand cscope recommends no packages. -- no debconf information -- mattia :wq!
--- src/vpinit.c.clean 2006-02-19 12:05:46.614956144 +0100 +++ src/vpinit.c 2006-02-19 12:05:53.376928967 +0100 @@ -99,7 +99,7 @@ /* count the nodes in the view path */ vpndirs = 1; for (i = 0; vpath[i] != '\0'; ++i) { - if (vpath[i] == ':') { + if (vpath[i] == ':' && vpath[i+1]) { ++vpndirs; } }
signature.asc
Description: Digital signature