bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gtags segment fault when read from file.


From: Shigio YAMAGUCHI
Subject: Re: gtags segment fault when read from file.
Date: Tue, 30 Sep 2008 12:41:24 +0900

On Mon, 29 Sep 2008 00:05:00 +0800
"Jianbin Kang" <address@hidden> wrote:

> Hello, bug-global
>      If gtags read its input files from a file list (use -f option),
> and the input files aren't in
>      the working directory or its sub-directory of gtags, it will segment 
> fault.
>     It seems that the function 'normalize' in libutil/file.c, line 623
> will return NULL,
>     which causes the problem.

Hello,

I believe I have fixed the bug. The following patch will be reflected
in the next version.
Thank you for your bug report!

Index: libutil/find.c
===================================================================
RCS file: /sources/global/global/libutil/find.c,v
retrieving revision 1.67
diff -c -r1.67 find.c
*** libutil/find.c      14 Jul 2008 01:21:02 -0000      1.67
--- libutil/find.c      30 Sep 2008 03:32:45 -0000
***************
*** 638,644 ****
                 *      rootdir  /a/b/
                 *      buf      /a/b/c/d.c -> c/d.c -> ./c/d.c
                 */
!               path = normalize(path, rootdir, cwddir, buf, sizeof(buf));
                /*
                 * GLOBAL cannot treat path which includes blanks.
                 * It will be improved in the future.
--- 638,648 ----
                 *      rootdir  /a/b/
                 *      buf      /a/b/c/d.c -> c/d.c -> ./c/d.c
                 */
!               if (normalize(path, rootdir, cwddir, buf, sizeof(buf)) == NULL) 
{
!                       warning("'%s' is out of source tree. (Ignored)", path);
!                       continue;
!               }
!               path = buf;
                /*
                 * GLOBAL cannot treat path which includes blanks.
                 * It will be improved in the future.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]