bug-global
[Top][All Lists]
Advanced

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

Re: [PATCH] g[c]tags fault


From: Eric Paire
Subject: Re: [PATCH] g[c]tags fault
Date: Wed, 28 Mar 2001 15:35:47 +0200

Hi,

You will find attached a test case showing the problem. Unfortunately, it
does not code dump (since the corruption of the memory is not sufficient :-)
but you can see the problem by using "gctags --debug --debug --debug -w" :
Only one #if is detected, but plenty of #endif, which makes "piflevel" in C.c
become negative (and negatively indexing an array may lead to ... :-(

> Hi,
> > I have used globals for the first time in a large C/C++ project and it 
> > showed
> > up with a segmentation fault. After some investigation, I discovered that
> > gctags eats up the first token after a // comment in a line beginning with
> > a preprocessor conditional directive (which is particularly annoying when
> > this tag is a new block entry as #if ;-)
> 
> I didn't understand the problem.
> Could you please give me a test case which brings the segmentation fault?
> Thank you!
> --
> Shigio Yamaguchi - Tama Communications Corporation
> Mail: address@hidden, (Spare mail: address@hidden)
> 
-Eric
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web  : http://www.ri.silicomp.com/~paire  | Groupe SILICOMP - Research Institute
Email: address@hidden         | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71               | F-38610 Gieres
Fax  : +33 (0) 476 51 05 32               | FRANCE
------ Cut Here  ------ Cut Here  ------ Cut Here  ------ Cut Here  ------
main() {
#if A // text
#if B // text
#if C // text
#if D // text
#if E // text
#if F // text
#if G // text
        foo(0);
#endif
#endif
#endif
#endif
#endif
#endif
        exit(1);
}



reply via email to

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