From unknown Wed Sep 10 08:16:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79234 <79234@debbugs.gnu.org> To: bug#79234 <79234@debbugs.gnu.org> Subject: Status: Global completion without limit arg terminates on first libdb Reply-To: bug#79234 <79234@debbugs.gnu.org> Date: Wed, 10 Sep 2025 15:16:04 +0000 retitle 79234 Global completion without limit arg terminates on first libdb reassign 79234 global submitter 79234 ross@evermain.com.au severity 79234 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 14 07:15:19 2025 Received: (at submit) by debbugs.gnu.org; 14 Aug 2025 11:15:19 +0000 Received: from localhost ([127.0.0.1]:32980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umVvP-0000c3-PA for submit@debbugs.gnu.org; Thu, 14 Aug 2025 07:15:19 -0400 Received: from vmse02.mailcluster.com.au ([2401:fc00:0:14::6]:58492) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1umT8w-0008Qa-Uw for submit@debbugs.gnu.org; Thu, 14 Aug 2025 04:17:05 -0400 Received: from vmcp02.web-servers.com.au ([116.90.56.17]) by vmse02.mailcluster.com.au with esmtps (TLS1.2) tls TLS_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1umT8k-0005aM-KC for submit@debbugs.gnu.org; Thu, 14 Aug 2025 18:16:52 +1000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=evermain.com.au; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:Reply-To:Subject:To:From:Date:MIME-Version:Sender:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OwrJQzmGvcA/jvZRE6r9Av/MaUqKOLAf00QgNdfZZBo=; b=WMs08nZarHB9y1/flPSAVJ+TMB S0XKMMFl5gCTX2AIbQCAb2Mpy8y32vJBuoe7O7qIf/AYwwt4p9isZnysVGfq4sCX3T2ShjQjQXVmY zz4EaouAVvN6JvOwlG3UPYqjmLiKTBEgnfHvEIEQHu7YzeNHLJ0nEVqMmUPX+ucZlpniwbWND93w6 9mm5aJ+tCgfMHJeAc/NSuUd04BGVsUFHFURoa2fFyMl17kwvJzYf6w2JE+xhXUmBpeo2/6w/U/c+r F6yRZT59D21RYbV8AFTWc46hG9EtCsipBSxAaXHrNlMPNZIh1ZkHxfe2yUtsFbrjz5D5B6C9EsYKo VnPX5Uyg==; Received: from [::1] (port=49326 helo=vmcp02.web-servers.com.au) by vmcp02.web-servers.com.au with esmtpa (Exim 4.98.1) (envelope-from ) id 1umT85-00000009Gr7-2dbe for submit@debbugs.gnu.org; Thu, 14 Aug 2025 18:16:09 +1000 MIME-Version: 1.0 Date: Thu, 14 Aug 2025 16:16:09 +0800 From: Ross Bennett To: submit@debbugs.gnu.org Subject: Global completion without limit arg terminates on first libdb Mail-Reply-To: ross@evermain.com.au User-Agent: Roundcube Webmail/1.6.11 Message-ID: <604f264264db727ad0dcd5f548325a65@evermain.com.au> X-Sender: ross@evermain.com.au Organization: Evermain Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-User: ross@evermain.com.au X-Authenticator: dovecot_login X-Originating-IP: 116.90.56.17 X-SpamExperts-Domain: panthur-sh-outbound0.mailcluster.com.au X-SpamExperts-Username: 116.90.56.17 Authentication-Results: mailcluster.com.au; auth=pass smtp.auth=116.90.56.17@panthur-sh-outbound0.mailcluster.com.au X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.15) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo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cUWAcjkEQ3UChXgdxqhh1gYZY5UIBDIq593FTCCHPLbroBXoXqfdxZ 6Xsc9abISq4CGFvn9/wEwDuTOOhBgGsomA== X-Report-Abuse-To: spam@vmse01.mailcluster.com.au X-Complaints-To: abuse@vmse01.mailcluster.com.au X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 14 Aug 2025 07:15:14 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ross@evermain.com.au Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Package: global Version: 6.6.14 When I have a GTAGSLIBPATH involving multiple directories, a global command to find completions of tags in the second path entry fails. It works if I give a limit to the completion argument. e.g. I have 2 library directories, /srv1/source/dir1 and /srv1/source/dir2, and dbg_foo() defined in /srv1/source/dir2/file1.c. I run gtags in each of these directories. I have GTAGSLIBPATH=/srv1/source/dir1/:/srv1/source/dir2/ From another directory also with GTAGS I run 'global -c dbg_f' and get nothing. It gives completions from the first library fine. Also, using a limit avoids the issue. Running 'global --completion=1 dbg_f' and it gives dbg_foo successfully. On one occasion I think I got this to work initially, but then it failed on repeats, I'm not sure why or even if I was doing the tests correctly at that point. Looking at the 6.6.14 code, I think the issue is in global/global.c, line 1091: if (total >= limit) break; Without a completion limit argument, the limit variable is set to 0. So, if no entries are found in the first library path, the total is 0, which still qualifies for >= 0, which aborts the loop. Having a limit argument avoids that problem. I adjusted the code in a local checkout to be if (total > limit) and the compiled binary then worked correctly for dbg_foo with global -c dbg_f. Hope this helps Ross -- Ross Bennett