From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45246: 28.0.50; etags assertion error Date: Fri, 10 Jun 2022 10:25:52 +0300 Message-ID: <8335gd0ykf.fsf@gnu.org> References: <87k0tklzzz.fsf@no.workgroup> <87o7z4k8ob.fsf@gnus.org> <87a6ao7dnh.fsf@no.workgroup> <838rq879ey.fsf@gnu.org> <83y1y85rko.fsf@gnu.org> <83zgil20oe.fsf@gnu.org> <874k0tznif.fsf@gnus.org> <83k09p1x3o.fsf@gnu.org> <87mtelsc0s.fsf@no.workgroup> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34872"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 45246-done@debbugs.gnu.org To: Gregor Zattler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 09:28:50 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzZ4c-0008tE-01 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 09:28:50 +0200 Original-Received: from localhost ([::1]:43696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzZ4a-0002Im-T6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 03:28:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZ2v-0000iG-R4 for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 03:27:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzZ2v-0001by-6a for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 03:27:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzZ2t-0007th-3B for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 03:27:03 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 07:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 45246 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 45246@debbugs.gnu.org, eliz@gnu.org, grfz@gmx.de Original-Received: via spool by 45246-done@debbugs.gnu.org id=D45246.165484596630248 (code D ref 45246); Fri, 10 Jun 2022 07:27:02 +0000 Original-Received: (at 45246-done) by debbugs.gnu.org; 10 Jun 2022 07:26:06 +0000 Original-Received: from localhost ([127.0.0.1]:48552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZ1y-0007ro-C1 for submit@debbugs.gnu.org; Fri, 10 Jun 2022 03:26:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZ1t-0007rH-Tw for 45246-done@debbugs.gnu.org; Fri, 10 Jun 2022 03:26:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZ1o-0001NW-Im; Fri, 10 Jun 2022 03:25:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Pm9vfd3Ia/A6V5a80PzIUEpi8z4PddlNtFqRZj3NqFI=; b=Z7OX9nDpvXTdiC3xnJGA OVHrq6ukL6EIO7YaLjfHNgcceFYnAN70mEKCKvzFb4haVWczKliWfntaK6Qe5/i/5EOHrcu6/eN+6 XH4zvgBJjt9OCjlahSBOMXhoVE4Tz4eOPiXIWRjfvdMzu7EJr99y+00YrE93WxdMF8lKhduxC91Il uRxf66EyfHzX5zaPzY7lF13M7lBOxd99SQ3Qru7o/hceTfFrsycm2RgKRJ0Ik7Kp4hjiBgYoplIqI QSwPZ45iIrRFwLcleo8zXMj5rIcR/a8eek0kBFfUvtG1/05sg+1B65nWY9VA7+tX/KsBw8VvuEK5G nykNlTKeQbIBsw==; Original-Received: from [87.69.77.57] (port=1730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZ1m-0002ae-Ra; Fri, 10 Jun 2022 03:25:55 -0400 In-Reply-To: <87mtelsc0s.fsf@no.workgroup> (message from Gregor Zattler on Fri, 10 Jun 2022 00:33:07 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234191 Archived-At: > From: Gregor Zattler > Cc: 45246@debbugs.gnu.org > Date: Fri, 10 Jun 2022 00:33:07 +0200 > > >> > And indeed, invoking "etags -I" compiled with --enable-checking with > >> > the original file avoids the assertion violation. And in a production > >> > build, etags produces a valid TAGS file even if -I is omitted. > >> > > >> > So I think there's nothing to do here, and we should close this bug as > >> > notabug. Does anyone disagree? > >> > >> I think that sounds correct. > > I confirm -I avoids the assertion. > > > Gregor, any objections to closing this bug? > > no. OK, done. > I must admit, I did not read the man pager closely but > anyway I wouldn't have understood the consequences of > setting vs not setting -I. Perhaps the documentation could > be amended somehow? I've added some notes about this to the manual and to the etags man page, thanks. > I assume this is a trade-of between speed and robustness? No, I think it's more about the correctness of the produced TAGS file than about speed. etags's C/C++ parser is extremely naïve and largely ignores the complicated syntax of the C dialects. So using the "closing brace in column zero ends all top-level definitions" heuristic is useful for preventing 'etags' from being utterly confused by some sophisticated use of C/C++ facilities, such as macros and the more arcane syntactic constructs in modern C++: it makes sure the confusion ends as early as possible. > I do not have objections to closing this bug > report, but I wonder why etags treats closing braces in > the first column special if it does not speed up things? See above. Whether this is a real problem, I don't know. I think the only way to tell is to try. At least with our test suite for 'etags', using -I causes regressions, e.g. in cp-src/c.C some tags are not created. So I think having this heuristic on by default is a good thing, overall.