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:26:07 +0300 Message-ID: <831qvx0yk0.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="30613"; 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:00 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 1nzZ3o-0007mM-Ln for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 09:28:00 +0200 Original-Received: from localhost ([::1]:41972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzZ3n-0000lj-7N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 03:27:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZ2w-0000jG-7V for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 03:27:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzZ2v-0001bz-Lx 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-0007ts-Ik for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 03:27:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 07:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45246 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45246-done@debbugs.gnu.org id=D45246.165484597930273 (code D ref 45246); Fri, 10 Jun 2022 07:27:03 +0000 Original-Received: (at 45246-done) by debbugs.gnu.org; 10 Jun 2022 07:26:19 +0000 Original-Received: from localhost ([127.0.0.1]:48556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZ2A-0007sD-LS for submit@debbugs.gnu.org; Fri, 10 Jun 2022 03:26:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZ29-0007s0-4l for 45246-done@debbugs.gnu.org; Fri, 10 Jun 2022 03:26:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZ23-0001OO-Rm; Fri, 10 Jun 2022 03:26:11 -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=P9OQLCAwzcedfVnh+Kgn afSi1HbZLs/Cf8wqcWX9JxYwycQEd+d5Sm9qz8XRdOJhHxrpR7mcTFCcD+5DjOjdCeHPC/raJQ8Ss 8ooSbcBkme0hfqgMhBZbbuxuHWuWjJ6FyR7JWJdELpAJpfYBWxTFIGmo1bl8G/nmn39vSuFryiKRD dBdzddQtY/vq7ezo1VYd7odRn5rm4lblez+xZu99FDZSCAjZ0fDqT5lOIZNdwlly+3kTiiwWfXec/ yAgtcZMdltjUUflGivmjpXahO9RZT8/fbTIJO/X/2vgNzxf5eJMWx/F+U1F9EHPugwAtUzxEusWxN Tmg/xl1b2KDVsA==; Original-Received: from [87.69.77.57] (port=1746 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 1nzZ20-0002eN-OT; Fri, 10 Jun 2022 03:26:09 -0400 \From: Eli Zaretskii 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:234189 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.