From MAILER-DAEMON Mon May 07 23:52:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SRbTi-0006nS-4A
	for mharc-bug-global@gnu.org; Mon, 07 May 2012 23:52:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56667)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SRbTf-0006nI-It
	for bug-global@gnu.org; Mon, 07 May 2012 23:52:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SRbTd-0000aB-TO
	for bug-global@gnu.org; Mon, 07 May 2012 23:52:43 -0400
Received: from msa104lp.auone-net.jp ([222.3.140.167]:47784)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>)
	id 1SRbTd-0000Zh-Jt; Mon, 07 May 2012 23:52:41 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa104lp.auone-net.jp (au one net msa) with ESMTP id 2030A65003C;
	Tue,  8 May 2012 12:52:35 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q483qZxw030452;
	Tue, 8 May 2012 12:52:35 +0900 (JST)
Message-Id: <201205080352.q483qZxw030452@tamacom.com>
To: bug-global@gnu.org
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
Subject: [RFC] Functional enhancement of the --single-update option
Date: Tue, 08 May 2012 12:52:34 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.167
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 08 May 2012 03:52:44 -0000

I would like to extend the --single-update option of gtags(1)
so that we can treat the case of addition too.

[Current]
$ gtags
$ cp main.c main2.c				# new file
$ gtags --single-update=main2.c
gtags: 'main2.c' not found.			# Error
$ _

[New]
$ gtags
$ cp main.c main2.c				# new file
$ gtags --single-update=main2.c
$ _						# Success

Since this function is upward compatible,
there is no problem, I think.

Any problem?
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Wed May 30 01:57:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZbuU-0004YZ-Sk
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 01:57:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34008)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZaNc-00011l-0k
	for bug-global@gnu.org; Wed, 30 May 2012 00:19:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZaNZ-0002Rt-D6
	for bug-global@gnu.org; Wed, 30 May 2012 00:19:27 -0400
Received: from [218.249.47.111] (port=51139 helo=mailgw02.mediatek.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZaNY-0002RN-Bk
	for bug-global@gnu.org; Wed, 30 May 2012 00:19:25 -0400
Received: from mtkcas31.mediatek.inc [(172.27.4.80)] by mailgw02.mediatek.com
	(envelope-from <hs_xieminchen@mediatek.com>)
	(mailgw01.mediatek.com ESMTP with TLS)
	with ESMTP id 880901812; Wed, 30 May 2012 11:58:42 +0800
Received: from MTKMBS31.mediatek.inc ([172.27.4.75]) by mtkcas31.mediatek.inc
	([172.27.4.170]) with mapi; Wed, 30 May 2012 11:57:57 +0800
From: hs_ xieminchen <hs_xieminchen@mediatek.com>
To: "bug-global@gnu.org" <bug-global@gnu.org>
Date: Wed, 30 May 2012 11:57:54 +0800
Subject: Segmentation fault in version 6.2.3
Thread-Topic: Segmentation fault in version 6.2.3
Thread-Index: Ac0+GGQ1hEITmqt9TZCHReOi9k9Fmg==
Message-ID: <7BA715CE71F8E94DA1D1159187775FE44CEFD1188B@MTKMBS31.mediatek.inc>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: multipart/alternative;
	boundary="_000_7BA715CE71F8E94DA1D1159187775FE44CEFD1188BMTKMBS31media_"
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 218.249.47.111
X-Mailman-Approved-At: Wed, 30 May 2012 01:57:29 -0400
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 04:19:30 -0000

--_000_7BA715CE71F8E94DA1D1159187775FE44CEFD1188BMTKMBS31media_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Dear Gnu Global authors:
         I'm a vimer and enjoying with gnu-global. So thanks for your great=
 software.
         But when I update Global from 6.2.2. to 6.2.3 I've encountered a "=
Segmentation fault":

1.       what is your environment (OS)?:
linux 2.6.31, vim

2.       Which version of GLOBAL are you using?

6.2.3

3.       What did you do? (command line)

cd $(proj_root) (only contain main.c)

cat `pwd`/main.c > file.list

gtags -f file.list

4.       What did you expect from it?

Generate tags correctly

5.       What was occurred? (as is)

Segmentation fault

         After watching the codes, I find that the fault is caused by the r=
egex.c line 5759 in function regexec(). The line is:
                            boolean want_reg_info =3D !preg->no_sub && nmat=
ch > 0;
         And the program fault because the preg is NULL. The regexex() is c=
alled by the function find_read_filelist() in find.c line 756. The code cal=
ling the regexec() was:
                            If (regexec(suff, path, 0, 0, 0) !=3D 0) ...
         Here the suff is null, so the program fault. And the suff was a st=
atic regext point in the file find.c. It can only be inited in the function=
 issourcefile().
         So, I think the program fault because function issourcefile() is n=
ot called by somebody if I execute the commands above. But I don't know whe=
re and when to call this function, what's the meaning of this function. So =
I don't know how to resolve this bug. Could you please help me?

Best Regards



--_000_7BA715CE71F8E94DA1D1159187775FE44CEFD1188BMTKMBS31media_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
h2
	{mso-style-priority:9;
	mso-style-link:"Heading 2 Char";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:173%;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Cambria","serif";}
p.MsoDate, li.MsoDate, div.MsoDate
	{mso-style-priority:99;
	mso-style-link:"Date Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:5.0pt;
	margin-bottom:.0001pt;
	mso-para-margin-top:0cm;
	mso-para-margin-right:0cm;
	mso-para-margin-bottom:0cm;
	mso-para-margin-left:25.0gd;
	mso-para-margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.Heading2Char
	{mso-style-name:"Heading 2 Char";
	mso-style-priority:9;
	mso-style-link:"Heading 2";
	font-family:"Cambria","serif";
	font-weight:bold;}
span.DateChar
	{mso-style-name:"Date Char";
	mso-style-priority:99;
	mso-style-link:Date;}
.MsoChpDefault
	{mso-style-type:export-only;}
 /* Page Definitions */
 @page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:1024481402;
	mso-list-template-ids:374607990;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:"Courier New";
	mso-bidi-font-family:"Times New Roman";}
@list l1
	{mso-list-id:1162618788;
	mso-list-type:hybrid;
	mso-list-template-ids:-2022133634 1336574376 67698713 67698715 67698703 67=
698713 67698715 67698703 67698713 67698715;}
@list l1:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:60.0pt;
	text-indent:-18.0pt;}
@list l1:level2
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%2\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:84.0pt;
	text-indent:-21.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DZH-CN link=3Dblue vlink=3Dpurple style=3D'text-justify-trim:pu=
nctuation'>

<div class=3DSection1>

<p class=3DMsoNormal><span lang=3DEN-US>Dear Gnu Global authors:<o:p></o:p>=
</span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; I&#8217;m
a vimer and enjoying with gnu-global. So thanks for your great software.<o:=
p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; But
when I update Global from 6.2.2. to 6.2.3 I&#8217;ve encountered a &#8220;S=
egmentation
fault&#8221;:<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:-18.0pt=
;
mso-list:l1 level1 lfo2'><![if !supportLists]><span lang=3DEN-US><span
style=3D'mso-list:Ignore'>1.<span style=3D'font:7.0pt "Times New Roman"'>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=3DEN-US>what is your environment =
(OS)?:<o:p></o:p></span></p>

<p class=3DMsoNormal style=3D'margin-left:60.0pt'><span lang=3DEN-US>linux =
2.6.31,
vim<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:-18.0pt=
;
mso-list:l1 level1 lfo2'><![if !supportLists]><span lang=3DEN-US><span
style=3D'mso-list:Ignore'>2.<span style=3D'font:7.0pt "Times New Roman"'>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=3DEN-US>Which version of GLOBAL a=
re you
using?<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>6.2.3<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:-18.0pt=
;
mso-list:l1 level1 lfo2'><![if !supportLists]><span lang=3DEN-US><span
style=3D'mso-list:Ignore'>3.<span style=3D'font:7.0pt "Times New Roman"'>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=3DEN-US>What did you do? (command=
 line)<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>cd $(proj_root) (only contain main.c)<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>cat `pwd`/main.c &gt; file.list<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>gtags &#8211;f file.list<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:-18.0pt=
;
mso-list:l1 level1 lfo2'><![if !supportLists]><span lang=3DEN-US><span
style=3D'mso-list:Ignore'>4.<span style=3D'font:7.0pt "Times New Roman"'>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=3DEN-US>What did you expect from =
it?<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>Generate tags correctly<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:-18.0pt=
;
mso-list:l1 level1 lfo2'><![if !supportLists]><span lang=3DEN-US><span
style=3D'mso-list:Ignore'>5.<span style=3D'font:7.0pt "Times New Roman"'>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=3DEN-US>What was occurred? (as is=
)<o:p></o:p></span></p>

<p class=3DMsoListParagraph style=3D'margin-left:60.0pt;text-indent:0cm'><s=
pan
lang=3DEN-US>Segmentation fault<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; After
watching the codes, I find that the fault is caused by the regex.c line 575=
9 in
function regexec(). The line is:<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean
want_reg_info =3D !preg-&gt;no_sub &amp;&amp; nmatch &gt; 0;<o:p></o:p></sp=
an></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; And
the program fault because the preg is NULL. The regexex() is called by the
function find_read_filelist() in find.c line 756. The code calling the
regexec() was:<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If
(regexec(suff, path, 0, 0, 0) !=3D 0) &#8230;<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; Here
the suff is null, so the program fault. And the suff was a static regext po=
int
in the file find.c. It can only be inited in the function issourcefile().<o=
:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; So,
I think the program fault because function issourcefile() is not called by
somebody if I execute the commands above. But I don&#8217;t know where and =
when
to call this function, what&#8217;s the meaning of this function. So I don&=
#8217;t
know how to resolve this bug. Could you please help me?<o:p></o:p></span></=
p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US>Best Regards<o:p></o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>

--_000_7BA715CE71F8E94DA1D1159187775FE44CEFD1188BMTKMBS31media_--


From MAILER-DAEMON Wed May 30 02:48:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZci5-00066i-L3
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 02:48:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48683)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZci3-00066G-F4
	for bug-global@gnu.org; Wed, 30 May 2012 02:48:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZci1-0003M4-PV
	for bug-global@gnu.org; Wed, 30 May 2012 02:48:43 -0400
Received: from msa104lp.auone-net.jp ([222.3.140.167]:56392)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZci1-0003LP-9R
	for bug-global@gnu.org; Wed, 30 May 2012 02:48:41 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa104lp.auone-net.jp (au one net msa) with ESMTP id 812F965003C;
	Wed, 30 May 2012 15:48:36 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q4U6mZjj023948;
	Wed, 30 May 2012 15:48:35 +0900 (JST)
Message-Id: <201205300648.q4U6mZjj023948@tamacom.com>
To: hs_ xieminchen <hs_xieminchen@mediatek.com>
Subject: Re: Segmentation fault in version 6.2.3
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <7BA715CE71F8E94DA1D1159187775FE44CEFD1188B@MTKMBS31.mediatek.inc>
In-reply-to: Message from hs_ xieminchen <hs_xieminchen@mediatek.com> of "Wed,
	30 May 2012 11:57:54 +0800."
	<7BA715CE71F8E94DA1D1159187775FE44CEFD1188B@MTKMBS31.mediatek.inc>
Date: Wed, 30 May 2012 15:48:35 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.167
Cc: "bug-global@gnu.org" <bug-global@gnu.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 06:48:44 -0000

Dear Sir or Madam

Would you please try the following patch?
This bug will be fixed, I believe.

I had overlooked the big bug.
I will release a bug fix version (global-6.2.4) soon.

Thank you for the report.

Best Regards

Index: libutil/find.c
===================================================================
RCS file: /sources/global/global/libutil/find.c,v
retrieving revision 1.89
diff -c -r1.89 find.c
*** libutil/find.c	17 May 2012 11:43:05 -0000	1.89
--- libutil/find.c	30 May 2012 06:29:58 -0000
***************
*** 753,759 ****
  		 * A blank at the head of path means
  		 * other than source file.
  		 */
! 		if (regexec(suff, path, 0, 0, 0) != 0)
  			*--path = ' ';
  		return path;
  	}
--- 753,759 ----
  		 * A blank at the head of path means
  		 * other than source file.
  		 */
! 		if (!issourcefile(path))
  			*--path = ' ';
  		return path;
  	}

> Dear Gnu Global authors:
>          I'm a vimer and enjoying with gnu-global. So thanks for your great=
>  software.
>          But when I update Global from 6.2.2. to 6.2.3 I've encountered a "=
> Segmentation fault":
> 
> 1.       what is your environment (OS)?:
> linux 2.6.31, vim
> 
> 2.       Which version of GLOBAL are you using?
> 
> 6.2.3
> 
> 3.       What did you do? (command line)
> 
> cd $(proj_root) (only contain main.c)
> 
> cat `pwd`/main.c > file.list
> 
> gtags -f file.list
> 
> 4.       What did you expect from it?
> 
> Generate tags correctly
> 
> 5.       What was occurred? (as is)
> 
> Segmentation fault
> 
>          After watching the codes, I find that the fault is caused by the r=
> egex.c line 5759 in function regexec(). The line is:
>                             boolean want_reg_info =3D !preg->no_sub && nmat=
> ch > 0;
>          And the program fault because the preg is NULL. The regexex() is c=
> alled by the function find_read_filelist() in find.c line 756. The code cal=
> ling the regexec() was:
>                             If (regexec(suff, path, 0, 0, 0) !=3D 0) ...
>          Here the suff is null, so the program fault. And the suff was a st=
> atic regext point in the file find.c. It can only be inited in the function=
>  issourcefile().
>          So, I think the program fault because function issourcefile() is n=
> ot called by somebody if I execute the commands above. But I don't know whe=
> re and when to call this function, what's the meaning of this function. So =
> I don't know how to resolve this bug. Could you please help me?
> 
> Best Regards
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Wed May 30 03:52:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZdhj-00042m-A0
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 03:52:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52401)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZdJ3-0000VL-Ch
	for bug-global@gnu.org; Wed, 30 May 2012 03:27:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZdJ1-00052A-BV
	for bug-global@gnu.org; Wed, 30 May 2012 03:26:56 -0400
Received: from [218.249.47.111] (port=34641 helo=mailgw02.mediatek.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZdJ0-000517-BR
	for bug-global@gnu.org; Wed, 30 May 2012 03:26:55 -0400
Received: from mtkcas30.mediatek.inc [(172.27.4.79)] by mailgw02.mediatek.com
	(envelope-from <hs_xieminchen@mediatek.com>)
	(mailgw01.mediatek.com ESMTP with TLS)
	with ESMTP id 169144151; Wed, 30 May 2012 15:26:45 +0800
Received: from MTKMBS31.mediatek.inc ([172.27.4.75]) by mtkcas30.mediatek.inc
	([172.27.4.170]) with mapi; Wed, 30 May 2012 15:26:00 +0800
From: hs_ xieminchen <hs_xieminchen@mediatek.com>
To: Shigio YAMAGUCHI <shigio@gnu.org>
Date: Wed, 30 May 2012 15:25:56 +0800
Subject: RE: Segmentation fault in version 6.2.3
Thread-Topic: Segmentation fault in version 6.2.3
Thread-Index: Ac0+MgObYt/SvDaQTXyolKtQGxEQGQAAweBg
Message-ID: <7BA715CE71F8E94DA1D1159187775FE44CEFD118D5@MTKMBS31.mediatek.inc>
References: <7BA715CE71F8E94DA1D1159187775FE44CEFD1188B@MTKMBS31.mediatek.inc>
	<201205300648.q4U6mZjj023948@tamacom.com>
In-Reply-To: <201205300648.q4U6mZjj023948@tamacom.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-cr-hashedpuzzle: BN0b ChNN Cxkt DBRq E+Rk IGE4 IIQ3 KQqy OdJu PFtV QPBt
	SmoD SrFP TA9t TStq TkKJ; 2;
	YgB1AGcALQBnAGwAbwBiAGEAbABAAGcAbgB1AC4AbwByAGcAOwBzAGgAaQBnAGkAbwBAAGcAbgB1AC4AbwByAGcA;
	Sosha1_v1; 7; {B8218BF9-A6C8-4353-9E72-969B7C3C7F3A};
	aABzAF8AeABpAGUAbQBpAG4AYwBoAGUAbgBAAG0AZQBkAGkAYQB0AGUAawAuAGMAbwBtAA==;
	Wed, 30 May 2012 07:25:56 GMT;
	UgBFADoAIABTAGUAZwBtAGUAbgB0AGEAdABpAG8AbgAgAGYAYQB1AGwAdAAgAGkAbgAgAHYAZQByAHMAaQBvAG4AIAA2AC4AMgAuADMA
x-cr-puzzleid: {B8218BF9-A6C8-4353-9E72-969B7C3C7F3A}
acceptlanguage: en-US
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 218.249.47.111
X-Mailman-Approved-At: Wed, 30 May 2012 03:52:26 -0400
Cc: "bug-global@gnu.org" <bug-global@gnu.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 07:27:03 -0000

RGVhciBTaGlnaW86DQoJU28gdGhhbmtzIGZvciB5b3VyIGdyZWF0IGhlbHAsIHNvIGhhcHB5IGZv
ciBteSBndGFncyB3b3JrcyBhZ2Fpbi4NCglCeSB0aGUgd2F5LCBJJ20gdHJ5aW5nIHRvIHN0dWR5
IEdsb2JhbCdzIGNvZGVzLCBkbyB5b3UgaGF2ZSBhbnkgZG9jKHMpIHRvIGhlbHAgbWUgdG8gdW5k
ZXJzdGFuZCB0aGUgY29tcGxleCBsb2dpY3M/IFNvIHRoYW5rcyBmb3IgeW91ciBoZWxwIGFnYWlu
Lg0KDQpCZXN0IFJlZ2FyZHMNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IHNo
aWdpb0B0YW1hY29tLmNvbSBbbWFpbHRvOnNoaWdpb0B0YW1hY29tLmNvbV0gT24gQmVoYWxmIE9m
IFNoaWdpbyBZQU1BR1VDSEkNClNlbnQ6IDIwMTLE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bmsgdGhlIHByb2dyYW0gZmF1bHQgYmVjYXVzZSBmdW5j
dGlvbiBpc3NvdXJjZWZpbGUoKSANCj4gaXMgbj0gb3QgY2FsbGVkIGJ5IHNvbWVib2R5IGlmIEkg
ZXhlY3V0ZSB0aGUgY29tbWFuZHMgYWJvdmUuIEJ1dCBJIA0KPiBkb24ndCBrbm93IHdoZT0gcmUg
YW5kIHdoZW4gdG8gY2FsbCB0aGlzIGZ1bmN0aW9uLCB3aGF0J3MgdGhlIG1lYW5pbmcgDQo+IG9m
IHRoaXMgZnVuY3Rpb24uIFNvID0gSSBkb24ndCBrbm93IGhvdyB0byByZXNvbHZlIHRoaXMgYnVn
LiBDb3VsZCB5b3UgcGxlYXNlIGhlbHAgbWU/DQo+IA0KPiBCZXN0IFJlZ2FyZHMNCi0tDQpTaGln
aW8gWUFNQUdVQ0hJIDxzaGlnaW9AZ251Lm9yZz4NClBHUCBmaW5nZXJwcmludDogRDFDQiAwQjg5
IEIzNDYgNEFCNiA1NjYzICBDNEI2IDNDQTUgQkJCMyA1N0JFIEREQTMNCg==


From MAILER-DAEMON Wed May 30 04:12:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZe1Q-0003J3-Lv
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 04:12:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42788)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZe1L-0003Hj-7i
	for bug-global@gnu.org; Wed, 30 May 2012 04:12:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZe1I-0007pn-Rh
	for bug-global@gnu.org; Wed, 30 May 2012 04:12:42 -0400
Received: from msa101lp.auone-net.jp ([222.3.140.164]:43433)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>)
	id 1SZe1I-0007ow-I9; Wed, 30 May 2012 04:12:40 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa101lp.auone-net.jp (au one net msa) with ESMTP id 917FF18C038;
	Wed, 30 May 2012 17:12:36 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q4U8CZ8r032014;
	Wed, 30 May 2012 17:12:35 +0900 (JST)
Message-Id: <201205300812.q4U8CZ8r032014@tamacom.com>
To: hs_ xieminchen <hs_xieminchen@mediatek.com>
Subject: Re: Segmentation fault in version 6.2.3
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <7BA715CE71F8E94DA1D1159187775FE44CEFD118D5@MTKMBS31.mediatek.inc>
In-reply-to: Message from hs_ xieminchen <hs_xieminchen@mediatek.com> of "Wed,
	30 May 2012 15:25:56 +0800."
	<7BA715CE71F8E94DA1D1159187775FE44CEFD118D5@MTKMBS31.mediatek.inc>
Date: Wed, 30 May 2012 17:12:35 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.164
Cc: "bug-global@gnu.org" <bug-global@gnu.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 08:12:47 -0000

>        So thanks for your great help, so happy for my gtags works again.

It was good!  Your bug report was just help for me.

>        By the way, I'm trying to study Global's codes, do you have any
>	doc(s) to help me to underst and the complex logics? So thanks
>	for your help again.

Sorry but there is no document other than source code and 'ChangeLog'.
Since it is not a beautiful code, it may not be suitable for a object
of study.
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Wed May 30 04:49:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZeb1-0001Td-AY
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 04:49:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33800)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZeYM-000555-9j
	for bug-global@gnu.org; Wed, 30 May 2012 04:46:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>) id 1SZeYG-0000En-12
	for bug-global@gnu.org; Wed, 30 May 2012 04:46:49 -0400
Received: from [218.249.47.110] (port=58375 helo=mailgw01.mediatek.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hs_xieminchen@mediatek.com>)
	id 1SZeYF-00006R-BT; Wed, 30 May 2012 04:46:43 -0400
Received: from mtkcas30.mediatek.inc [(172.27.4.79)] by mailgw01.mediatek.com
	(envelope-from <hs_xieminchen@mediatek.com>)
	(mailgw01.mediatek.com ESMTP with TLS)
	with ESMTP id 1317479445; Wed, 30 May 2012 16:46:35 +0800
Received: from MTKMBS31.mediatek.inc ([172.27.4.75]) by mtkcas30.mediatek.inc
	([172.27.4.170]) with mapi; Wed, 30 May 2012 16:46:19 +0800
From: hs_ xieminchen <hs_xieminchen@mediatek.com>
To: Shigio YAMAGUCHI <shigio@gnu.org>
Date: Wed, 30 May 2012 16:46:18 +0800
Subject: RE: Segmentation fault in version 6.2.3
Thread-Topic: Segmentation fault in version 6.2.3
Thread-Index: Ac0+O/u6VcLR8uTVS6K76waD1bfdrwAAbxmw
Message-ID: <7BA715CE71F8E94DA1D1159187775FE44CEFD118FD@MTKMBS31.mediatek.inc>
References: <7BA715CE71F8E94DA1D1159187775FE44CEFD118D5@MTKMBS31.mediatek.inc>
	<201205300812.q4U8CZ8r032014@tamacom.com>
In-Reply-To: <201205300812.q4U8CZ8r032014@tamacom.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 218.249.47.110
X-Mailman-Approved-At: Wed, 30 May 2012 04:49:34 -0400
Cc: "bug-global@gnu.org" <bug-global@gnu.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 08:46:56 -0000

RGVhciBTaGlnaW86DQoJWW91IGFyZSBzbyBtb2Rlc3QuDQoJSSB0aGlua3MgR2xvYmFsIGlzIGEg
Z3JlYXQgcHJvamVjdC4gT25lIG9mIGl0cyBiaWdnZXN0IG1lcml0IGlzIHRoYXQgR2xvYmFsIGNv
dWxkIHNpbmdsZS11cGRhdGUgYSBmaWxlLiBTbyBJIGNhbiBrZWVwIHRoZSBUYWcgREIgaW4gdXBk
YXRlIHdpdGggYSBmZXcgc2Vjb25kcyBhZnRlciBzYXZpbmcgYSBmaWxlLiBHbG9iYWwgaXMgYWxz
byBmYXN0LCBzaW1wbHkgdG8gdXNlLiBJdCB0YW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2ZXJzaW9uIDYuMi4zDQoNCj4gICAgICAgIFNvIHRoYW5rcyBmb3IgeW91ciBncmVhdCBo
ZWxwLCBzbyBoYXBweSBmb3IgbXkgZ3RhZ3Mgd29ya3MgYWdhaW4uDQoNCkl0IHdhcyBnb29kISAg
WW91ciBidWcgcmVwb3J0IHdhcyBqdXN0IGhlbHAgZm9yIG1lLg0KDQo+ICAgICAgICBCeSB0aGUg
d2F5LCBJJ20gdHJ5aW5nIHRvIHN0dWR5IEdsb2JhbCdzIGNvZGVzLCBkbyB5b3UgaGF2ZSBhbnkN
Cj4JZG9jKHMpIHRvIGhlbHAgbWUgdG8gdW5kZXJzdCBhbmQgdGhlIGNvbXBsZXggbG9naWNzPyBT
byB0aGFua3MNCj4JZm9yIHlvdXIgaGVscCBhZ2Fpbi4NCg0KU29ycnkgYnV0IHRoZXJlIGlzIG5v
IGRvY3VtZW50IG90aGVyIHRoYW4gc291cmNlIGNvZGUgYW5kICdDaGFuZ2VMb2cnLg0KU2luY2Ug
aXQgaXMgbm90IGEgYmVhdXRpZnVsIGNvZGUsIGl0IG1heSBub3QgYmUgc3VpdGFibGUgZm9yIGEg
b2JqZWN0IG9mIHN0dWR5Lg0KLS0NClNoaWdpbyBZQU1BR1VDSEkgPHNoaWdpb0BnbnUub3JnPg0K
UEdQIGZpbmdlcnByaW50OiBEMUNCIDBCODkgQjM0NiA0QUI2IDU2NjMgIEM0QjYgM0NBNSBCQkIz
IDU3QkUgRERBMw0K


From MAILER-DAEMON Wed May 30 17:41:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZqds-00012L-Dl
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 17:41:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48638)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SZnBr-0002xK-Lv
	for bug-global@gnu.org; Wed, 30 May 2012 14:00:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SZnBp-00009N-H1
	for bug-global@gnu.org; Wed, 30 May 2012 14:00:11 -0400
Received: from plane.gmane.org ([80.91.229.3]:35583)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SZnBp-00005m-A7
	for bug-global@gnu.org; Wed, 30 May 2012 14:00:09 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SZnBk-0006Oy-El
	for bug-global@gnu.org; Wed, 30 May 2012 20:00:04 +0200
Received: from 0x5551089f.adsl.cybercity.dk ([85.81.8.159])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-global@gnu.org>; Wed, 30 May 2012 20:00:04 +0200
Received: from arne by 0x5551089f.adsl.cybercity.dk with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <bug-global@gnu.org>; Wed, 30 May 2012 20:00:04 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-global@gnu.org
From: =?iso-8859-1?Q?Arne_J=F8rgensen?= <arne@arnested.dk>
Subject: Problem running gtags on Drupal
Date: Wed, 30 May 2012 19:59:16 +0200
Organization: Arne Joergensen -- http://arnested.dk/
Lines: 33
Message-ID: <m262bd7dor.fsf@arnested.dk>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: 0x5551089f.adsl.cybercity.dk
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (darwin)
Cancel-Lock: sha1:rPCmhPKr4kxtA0d7GoS7NH0ZO2I=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
X-Mailman-Approved-At: Wed, 30 May 2012 17:41:18 -0400
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 May 2012 18:00:17 -0000

Hi,

When I'm trying to generate tag files for Drupal I run into this error
message (and exit status 2):

 input buffer overflow, can't enlarge buffer because scanner uses REJECT


I narrowed the problem down to one file in Drupal:

 http://drupalcode.org/project/drupal.git/blob_plain/30d1e719aa5e9a9ad66514078ca3b0975ddadc9c:/modules/system/system.api.php


And inside that file I narrowed the problem down to a large block
comment just before the hook_menu() function.

The block comment (lines 905-1209) is 305 lines long and removing any
~18 lines from the comment eliminates the problem.

Now, I don't have commit access to Drupal so I can't shorten the comment
by 18 lines myself and I'm not sure that would be the right solution
anyway :-)

Is this problem a known limit in gtags or something? Or is there some
way to get around the problem (besides using
:skip=modules/system/system.api.php)?

I'm using GNU GLOBAL 6.2 (and also tried 6.2.2 and 6.2.3) on Mac OS X
using Homebrew. I have a coworker running Ubuntu who experiences the
same problem (don't known his version though).

Best regards,
Arne



From MAILER-DAEMON Wed May 30 20:21:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SZt8X-0003Av-RC
	for mharc-bug-global@gnu.org; Wed, 30 May 2012 20:21:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58597)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZt8V-00039z-2f
	for bug-global@gnu.org; Wed, 30 May 2012 20:21:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZt8T-0008O7-0e
	for bug-global@gnu.org; Wed, 30 May 2012 20:21:06 -0400
Received: from msa101lp.auone-net.jp ([222.3.140.164]:45490)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SZt8S-0008Mg-GD
	for bug-global@gnu.org; Wed, 30 May 2012 20:21:04 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa101lp.auone-net.jp (au one net msa) with ESMTP id 4E28F18C038;
	Thu, 31 May 2012 09:21:00 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q4V0Kxx5050668;
	Thu, 31 May 2012 09:20:59 +0900 (JST)
Message-Id: <201205310020.q4V0Kxx5050668@tamacom.com>
To: Arne =?ISO-2022-JP?B?ShskQnhyGyhCZ2Vuc2Vu?= <arne@arnested.dk>,
	Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp>
Subject: Re: Problem running gtags on Drupal
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <m262bd7dor.fsf@arnested.dk>
In-reply-to: Message from Arne =?ISO-2022-JP?B?ShskQnhyGyhCZ2Vuc2Vu?=
	<arne@arnested.dk>
	of "Wed, 30 May 2012 19:59:16 +0200." <m262bd7dor.fsf@arnested.dk>
Date: Thu, 31 May 2012 09:20:59 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.164
Cc: bug-global@gnu.org
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2012 00:21:08 -0000

Hi,

It seems a limit of flex(1). The php parser of gtags(1) uses flex(1).

Please try the following to extend the limit.

[in GLOBAL project]

$ vi libparser/php.c

[libparser/php.c]
+-------------------------------
|#define YY_BUF_SIZE 16384
	|
	v
+-------------------------------
|#define YY_BUF_SIZE 65536

$ sudo make install


To Iwamoto san:

It seems that we can change the limit using the -D option of
the latest flex like this:

	flex -DYY_BUF_SIZE=65536 ...

I would like to change the limit using this option.
How about changing the required version of flex to 2.5.6 or later?

> Hi,
> 
> When I'm trying to generate tag files for Drupal I run into this error
> message (and exit status 2):
> 
>  input buffer overflow, can't enlarge buffer because scanner uses REJECT
> 
> 
> I narrowed the problem down to one file in Drupal:
> 
>  http://drupalcode.org/project/drupal.git/blob_plain/30d1e719aa5e9a9ad66514078ca3b0975ddadc9c:/mo
dules/system/system.api.php
> 
> 
> And inside that file I narrowed the problem down to a large block
> comment just before the hook_menu() function.
> 
> The block comment (lines 905-1209) is 305 lines long and removing any
> ~18 lines from the comment eliminates the problem.
> 
> Now, I don't have commit access to Drupal so I can't shorten the comment
> by 18 lines myself and I'm not sure that would be the right solution
> anyway :-)
> 
> Is this problem a known limit in gtags or something? Or is there some
> way to get around the problem (besides using
> :skip=modules/system/system.api.php)?
> 
> I'm using GNU GLOBAL 6.2 (and also tried 6.2.2 and 6.2.3) on Mac OS X
> using Homebrew. I have a coworker running Ubuntu who experiences the
> same problem (don't known his version though).
> 
> Best regards,
> Arne
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Thu May 31 10:30:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sa6Ok-0007bj-Rb
	for mharc-bug-global@gnu.org; Thu, 31 May 2012 10:30:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47400)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>) id 1Sa6OZ-0007aD-C6
	for bug-global@gnu.org; Thu, 31 May 2012 10:30:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>) id 1Sa6OP-0005fh-CF
	for bug-global@gnu.org; Thu, 31 May 2012 10:30:34 -0400
Received: from mow601.mserv.hi-ho.ne.jp ([202.32.78.168]:37768
	helo=mow.mserv.hi-ho.ne.jp) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>)
	id 1Sa6OC-0005Yh-NL; Thu, 31 May 2012 10:30:13 -0400
Received: by mow.mserv.hi-ho.ne.jp (mow601) id q4VEU42L022691;
	Thu, 31 May 2012 23:30:05 +0900
Received: from [192.168.24.64] (osk22-p180.flets.hi-ho.ne.jp [220.156.71.180])
	by mbox.mserv.hi-ho.ne.jp (hiho-mbox601) id q4VEU3lk031806;
	Thu, 31 May 2012 23:30:04 +0900
Date: Thu, 31 May 2012 23:30:10 +0900
From: Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp>
To: "Shigio YAMAGUCHI" <shigio@gnu.org>
Subject: Re: Problem running gtags on Drupal
In-Reply-To: <201205310020.q4V0Kxx5050668@tamacom.com>
References: <m262bd7dor.fsf@arnested.dk>
	<201205310020.q4V0Kxx5050668@tamacom.com>
Message-Id: <20120531233009.FDB4.1976CC75@kit.hi-ho.ne.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver. 2.61 [ja]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 202.32.78.168
Cc: bug-global@gnu.org,
	Arne =?ISO-2022-JP?B?ShskQiEmGyhCZ2Vuc2Vu?= <arne@arnested.dk>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2012 14:30:45 -0000

Hi.

> To Iwamoto san:
> 
> It seems that we can change the limit using the -D option of
> the latest flex like this:
> 
> 	flex -DYY_BUF_SIZE=65536 ...
> 
> I would like to change the limit using this option.
> How about changing the required version of flex to 2.5.6 or later?

I think that the limit of flex which caused the problem is that
using yylineno is regarded as using REJECT. 

flex-2.5.4:
        if ( do_yylineno )
                /* This should really be "maintain_backup_tables = true" */
                reject_really_used = true;

Since this code is eliminated in flex-2.5.11 and later, option -D may be
unnecessary if required version is changed to "2.5.11 or later". 

http://flex.cvs.sourceforge.net/viewvc/flex/flex/main.c?r1=2.94&r2=2.95


I could not find flex-2.5.11. 
Therefore, I checked the output of flex-2.5.4 and flex-2.3.35. 
========================================================================
$ flex --version
flex version 2.5.4
$ grep REJECT libparser/*.c
libparser/asm_scan.c:#define YY_USES_REJECT
libparser/asm_scan.c:#define REJECT \
libparser/asm_scan.c:#ifdef YY_USES_REJECT
libparser/asm_scan.c:"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
libparser/php.c:#define YY_USES_REJECT
libparser/php.c:#define REJECT \
libparser/php.c:#ifdef YY_USES_REJECT
libparser/php.c:"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
========================================================================
$ flex --version
flex 2.5.35
$ grep REJECT libparser/*.c
libparser/asm_scan.c: * any uses of REJECT which flex missed.
libparser/asm_scan.c:#define REJECT reject_used_but_not_detected
libparser/php.c: * any uses of REJECT which flex missed.
libparser/php.c:#define REJECT reject_used_but_not_detected


On Thu, 31 May 2012 09:20:59 +0900
"Shigio YAMAGUCHI" <shigio@gnu.org> wrote:

> Hi,
> 
> It seems a limit of flex(1). The php parser of gtags(1) uses flex(1).
> 
> Please try the following to extend the limit.
> 
> [in GLOBAL project]
> 
> $ vi libparser/php.c
> 
> [libparser/php.c]
> +-------------------------------
> |#define YY_BUF_SIZE 16384
> 	|
> 	v
> +-------------------------------
> |#define YY_BUF_SIZE 65536
> 
> $ sudo make install
> 
> 
> To Iwamoto san:
> 
> It seems that we can change the limit using the -D option of
> the latest flex like this:
> 
> 	flex -DYY_BUF_SIZE=65536 ...
> 
> I would like to change the limit using this option.
> How about changing the required version of flex to 2.5.6 or later?
> 
> > Hi,
> > 
> > When I'm trying to generate tag files for Drupal I run into this error
> > message (and exit status 2):
> > 
> >  input buffer overflow, can't enlarge buffer because scanner uses REJECT
> > 
> > 
> > I narrowed the problem down to one file in Drupal:
> > 
> >  http://drupalcode.org/project/drupal.git/blob_plain/30d1e719aa5e9a9ad66514078ca3b0975ddadc9c:/mo
> dules/system/system.api.php
> > 
> > 
> > And inside that file I narrowed the problem down to a large block
> > comment just before the hook_menu() function.
> > 
> > The block comment (lines 905-1209) is 305 lines long and removing any
> > ~18 lines from the comment eliminates the problem.
> > 
> > Now, I don't have commit access to Drupal so I can't shorten the comment
> > by 18 lines myself and I'm not sure that would be the right solution
> > anyway :-)
> > 
> > Is this problem a known limit in gtags or something? Or is there some
> > way to get around the problem (besides using
> > :skip=modules/system/system.api.php)?
> > 
> > I'm using GNU GLOBAL 6.2 (and also tried 6.2.2 and 6.2.3) on Mac OS X
> > using Homebrew. I have a coworker running Ubuntu who experiences the
> > same problem (don't known his version though).
> > 
> > Best regards,
> > Arne
> --
> Shigio YAMAGUCHI <shigio@gnu.org>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

-- 
$B4dK\(B $B=(<y(B <h-iwamoto@kit.hi-ho.ne.jp>



From MAILER-DAEMON Thu May 31 16:42:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaCCa-0000gV-Hk
	for mharc-bug-global@gnu.org; Thu, 31 May 2012 16:42:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40136)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SaADG-0007K9-3H
	for bug-global@gnu.org; Thu, 31 May 2012 14:35:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SaADD-0003zV-Nx
	for bug-global@gnu.org; Thu, 31 May 2012 14:35:09 -0400
Received: from plane.gmane.org ([80.91.229.3]:51602)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SaADD-0003xM-Ht
	for bug-global@gnu.org; Thu, 31 May 2012 14:35:07 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gnu-bug-global@m.gmane.org>) id 1SaADA-00086B-8V
	for bug-global@gnu.org; Thu, 31 May 2012 20:35:04 +0200
Received: from 0x5551089f.adsl.cybercity.dk ([85.81.8.159])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-global@gnu.org>; Thu, 31 May 2012 20:35:04 +0200
Received: from arne by 0x5551089f.adsl.cybercity.dk with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <bug-global@gnu.org>; Thu, 31 May 2012 20:35:04 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-global@gnu.org
From: =?iso-8859-1?Q?Arne_J=F8rgensen?= <arne@arnested.dk>
Subject: Re: Problem running gtags on Drupal
Date: Thu, 31 May 2012 20:34:51 +0200
Organization: Arne Joergensen -- http://arnested.dk/
Lines: 84
Message-ID: <m24nqwxkqc.fsf@arnested.dk>
References: <m262bd7dor.fsf@arnested.dk>
	<201205310020.q4V0Kxx5050668@tamacom.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@dough.gmane.org
X-Gmane-NNTP-Posting-Host: 0x5551089f.adsl.cybercity.dk
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (darwin)
Cancel-Lock: sha1:yWQoeXK/waEC50jQAhlxZHm6l7A=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
X-Mailman-Approved-At: Thu, 31 May 2012 16:42:35 -0400
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2012 18:35:11 -0000

Hi,

Thank you, Hideki IWAMOTO and Shigio YAMAGUCHI.

The version of flex on my mac is 2.5.35 so I guess global/gtags is build
using that.

I rebuild global/gtags with YY_BUF_SIZE 65536 and that indeed
helped. Now I can generate tag files for system.api.php as well as the
rest of Drupal.

Best regards,
Arne

"Shigio YAMAGUCHI" <shigio@gnu.org> writes:

> Hi,
>
> It seems a limit of flex(1). The php parser of gtags(1) uses flex(1).
>
> Please try the following to extend the limit.
>
> [in GLOBAL project]
>
> $ vi libparser/php.c
>
> [libparser/php.c]
> +-------------------------------
> |#define YY_BUF_SIZE 16384
> 	|
> 	v
> +-------------------------------
> |#define YY_BUF_SIZE 65536
>
> $ sudo make install
>
>
> To Iwamoto san:
>
> It seems that we can change the limit using the -D option of
> the latest flex like this:
>
> 	flex -DYY_BUF_SIZE=65536 ...
>
> I would like to change the limit using this option.
> How about changing the required version of flex to 2.5.6 or later?
>
>> Hi,
>> 
>> When I'm trying to generate tag files for Drupal I run into this error
>> message (and exit status 2):
>> 
>>  input buffer overflow, can't enlarge buffer because scanner uses REJECT
>> 
>> 
>> I narrowed the problem down to one file in Drupal:
>> 
>>  http://drupalcode.org/project/drupal.git/blob_plain/30d1e719aa5e9a9ad66514078ca3b0975ddadc9c:/mo
> dules/system/system.api.php
>> 
>> 
>> And inside that file I narrowed the problem down to a large block
>> comment just before the hook_menu() function.
>> 
>> The block comment (lines 905-1209) is 305 lines long and removing any
>> ~18 lines from the comment eliminates the problem.
>> 
>> Now, I don't have commit access to Drupal so I can't shorten the comment
>> by 18 lines myself and I'm not sure that would be the right solution
>> anyway :-)
>> 
>> Is this problem a known limit in gtags or something? Or is there some
>> way to get around the problem (besides using
>> :skip=modules/system/system.api.php)?
>> 
>> I'm using GNU GLOBAL 6.2 (and also tried 6.2.2 and 6.2.3) on Mac OS X
>> using Homebrew. I have a coworker running Ubuntu who experiences the
>> same problem (don't known his version though).
>> 
>> Best regards,
>> Arne
> --
> Shigio YAMAGUCHI <shigio@gnu.org>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3



From MAILER-DAEMON Thu May 31 18:18:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaDgv-0000Ev-6e
	for mharc-bug-global@gnu.org; Thu, 31 May 2012 18:18:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58507)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SaDgr-000075-9K
	for bug-global@gnu.org; Thu, 31 May 2012 18:17:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SaDgp-0003Gi-Eo
	for bug-global@gnu.org; Thu, 31 May 2012 18:17:56 -0400
Received: from msa104lp.auone-net.jp ([222.3.140.167]:43501)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>)
	id 1SaDgo-0003G0-Uu; Thu, 31 May 2012 18:17:55 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa104lp.auone-net.jp (au one net msa) with ESMTP id 3027765003C;
	Fri,  1 Jun 2012 07:17:48 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q4VMHmR6020923;
	Fri, 1 Jun 2012 07:17:48 +0900 (JST)
Message-Id: <201205312217.q4VMHmR6020923@tamacom.com>
To: Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp>
Subject: Re: Problem running gtags on Drupal
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <20120531233009.FDB4.1976CC75@kit.hi-ho.ne.jp>
In-reply-to: Message from Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp> of "Thu,
	31 May 2012 23:30:10 JST."
	<20120531233009.FDB4.1976CC75@kit.hi-ho.ne.jp>
Date: Fri, 01 Jun 2012 07:17:48 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.167
Cc: Arne =?ISO-2022-JP?B?ShskQiEmGyhCZ2Vuc2Vu?= <arne@arnested.dk>,
	bug-global@gnu.org
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2012 22:17:59 -0000

Hi,
I checked that the parser generated by flex-2.5.35 without
changing YY_BUF_SIZE works well on the source code which had
caused 'input buffer overflow' error.

>From now on, I will use flex-2.5.35.  Since we cannot check
flex-2.5.11, should we make flex-2.5.35 new required version?

Thank you for investigating.

> I think that the limit of flex which caused the problem is that
> using yylineno is regarded as using REJECT. 
> 
> flex-2.5.4:
>         if ( do_yylineno )
>                 /* This should really be "maintain_backup_tables = true" */
>                 reject_really_used = true;
> 
> Since this code is eliminated in flex-2.5.11 and later, option -D may be
> unnecessary if required version is changed to "2.5.11 or later". 
> 
> http://flex.cvs.sourceforge.net/viewvc/flex/flex/main.c?r1=2.94&r2=2.95
> 
> 
> I could not find flex-2.5.11. 
> Therefore, I checked the output of flex-2.5.4 and flex-2.3.35. 
> ========================================================================
> $ flex --version
> flex version 2.5.4
> $ grep REJECT libparser/*.c
> libparser/asm_scan.c:#define YY_USES_REJECT
> libparser/asm_scan.c:#define REJECT \
> libparser/asm_scan.c:#ifdef YY_USES_REJECT
> libparser/asm_scan.c:"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
> libparser/php.c:#define YY_USES_REJECT
> libparser/php.c:#define REJECT \
> libparser/php.c:#ifdef YY_USES_REJECT
> libparser/php.c:"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
> ========================================================================
> $ flex --version
> flex 2.5.35
> $ grep REJECT libparser/*.c
> libparser/asm_scan.c: * any uses of REJECT which flex missed.
> libparser/asm_scan.c:#define REJECT reject_used_but_not_detected
> libparser/php.c: * any uses of REJECT which flex missed.
> libparser/php.c:#define REJECT reject_used_but_not_detected
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Thu May 31 18:27:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaDq3-0006Xd-U5
	for mharc-bug-global@gnu.org; Thu, 31 May 2012 18:27:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59413)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>) id 1SaDq1-0006XF-Hi
	for bug-global@gnu.org; Thu, 31 May 2012 18:27:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>) id 1SaDpz-0005VN-Ag
	for bug-global@gnu.org; Thu, 31 May 2012 18:27:25 -0400
Received: from mow600.mserv.hi-ho.ne.jp ([202.32.78.136]:60751
	helo=mow.mserv.hi-ho.ne.jp) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <h-iwamoto@kit.hi-ho.ne.jp>) id 1SaDpy-0005UU-Rt
	for bug-global@gnu.org; Thu, 31 May 2012 18:27:23 -0400
Received: by mow.mserv.hi-ho.ne.jp (mow600) id q4VMRHCS023896;
	Fri, 1 Jun 2012 07:27:17 +0900
Received: from [192.168.24.64] (osk22-p180.flets.hi-ho.ne.jp [220.156.71.180])
	by mbox.mserv.hi-ho.ne.jp (hiho-mbox602) id q4VMRGkZ018390;
	Fri, 1 Jun 2012 07:27:16 +0900
Date: Fri, 01 Jun 2012 07:27:23 +0900
From: Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp>
To: Arne =?SHIFT_JIS?B?SvhyZ2Vuc2Vu?= <arne@arnested.dk>
Subject: Re: Problem running gtags on Drupal
In-Reply-To: <m24nqwxkqc.fsf@arnested.dk>
References: <201205310020.q4V0Kxx5050668@tamacom.com>
	<m24nqwxkqc.fsf@arnested.dk>
Message-Id: <20120601072722.5842.1976CC75@kit.hi-ho.ne.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver. 2.61 [ja]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 202.32.78.136
Cc: bug-global@gnu.org
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2012 22:27:27 -0000

Hi.

> The version of flex on my mac is 2.5.35 so I guess global/gtags is build
> using that.


If you re-generated C-source(*.c) from Lex-source(*.l) using flex-2.5.35,
the message

> >>  input buffer overflow, can't enlarge buffer because scanner uses REJEC

should never be displayed. I think that you are using C-source generated
using flex-2.5.4 included in the GLOBAL distribution. 

Would you try the following commands? 

  cd global-6.2.x
  flex -o libparser/php.c libparser/php.l
  ./configure
  make
  make install


On Thu, 31 May 2012 20:34:51 +0200
Arne J$B".(Bgensen <arne@arnested.dk> wrote:

> Hi,
> 
> Thank you, Hideki IWAMOTO and Shigio YAMAGUCHI.
> 
> The version of flex on my mac is 2.5.35 so I guess global/gtags is build
> using that.
> 
> I rebuild global/gtags with YY_BUF_SIZE 65536 and that indeed
> helped. Now I can generate tag files for system.api.php as well as the
> rest of Drupal.
> 
> Best regards,
> Arne
> 
> "Shigio YAMAGUCHI" <shigio@gnu.org> writes:
> 
> > Hi,
> >
> > It seems a limit of flex(1). The php parser of gtags(1) uses flex(1).
> >
> > Please try the following to extend the limit.
> >
> > [in GLOBAL project]
> >
> > $ vi libparser/php.c
> >
> > [libparser/php.c]
> > +-------------------------------
> > |#define YY_BUF_SIZE 16384
> > 	|
> > 	v
> > +-------------------------------
> > |#define YY_BUF_SIZE 65536
> >
> > $ sudo make install
> >
> >
> > To Iwamoto san:
> >
> > It seems that we can change the limit using the -D option of
> > the latest flex like this:
> >
> > 	flex -DYY_BUF_SIZE=65536 ...
> >
> > I would like to change the limit using this option.
> > How about changing the required version of flex to 2.5.6 or later?
> >
> >> Hi,
> >> 
> >> When I'm trying to generate tag files for Drupal I run into this error
> >> message (and exit status 2):
> >> 
> >>  input buffer overflow, can't enlarge buffer because scanner uses REJECT
> >> 
> >> 
> >> I narrowed the problem down to one file in Drupal:
> >> 
> >>  http://drupalcode.org/project/drupal.git/blob_plain/30d1e719aa5e9a9ad66514078ca3b0975ddadc9c:/mo
> > dules/system/system.api.php
> >> 
> >> 
> >> And inside that file I narrowed the problem down to a large block
> >> comment just before the hook_menu() function.
> >> 
> >> The block comment (lines 905-1209) is 305 lines long and removing any
> >> ~18 lines from the comment eliminates the problem.
> >> 
> >> Now, I don't have commit access to Drupal so I can't shorten the comment
> >> by 18 lines myself and I'm not sure that would be the right solution
> >> anyway :-)
> >> 
> >> Is this problem a known limit in gtags or something? Or is there some
> >> way to get around the problem (besides using
> >> :skip=modules/system/system.api.php)?
> >> 
> >> I'm using GNU GLOBAL 6.2 (and also tried 6.2.2 and 6.2.3) on Mac OS X
> >> using Homebrew. I have a coworker running Ubuntu who experiences the
> >> same problem (don't known his version though).
> >> 
> >> Best regards,
> >> Arne
> > --
> > Shigio YAMAGUCHI <shigio@gnu.org>
> > PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
> 
> 
> _______________________________________________
> Bug-global mailing list
> Bug-global@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-global

-- 
Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp>



