From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode Date: Fri, 12 Feb 2021 14:56:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18150"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 46400@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 12 15:57:28 2021 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 1lAZst-0004bV-0M for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 15:57:27 +0100 Original-Received: from localhost ([::1]:52510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAZsp-0004GU-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 09:57:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAZsU-0004GM-9u for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 09:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAZsU-0000y6-2t for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 09:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAZsU-00030a-0q for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 09:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Feb 2021 14:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46400 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 46400-submit@debbugs.gnu.org id=B46400.161314181211549 (code B ref 46400); Fri, 12 Feb 2021 14:57:01 +0000 Original-Received: (at 46400) by debbugs.gnu.org; 12 Feb 2021 14:56:52 +0000 Original-Received: from localhost ([127.0.0.1]:32778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAZsJ-00030D-Pd for submit@debbugs.gnu.org; Fri, 12 Feb 2021 09:56:52 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:34297 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lAZsI-0002zz-I9 for 46400@debbugs.gnu.org; Fri, 12 Feb 2021 09:56:51 -0500 Original-Received: (qmail 22707 invoked by uid 3782); 12 Feb 2021 14:56:42 -0000 Original-Received: from acm.muc.de (p4fe15b4a.dip0.t-ipconnect.de [79.225.91.74]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 12 Feb 2021 15:56:42 +0100 Original-Received: (qmail 23766 invoked by uid 1000); 12 Feb 2021 14:56:41 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:199860 Archived-At: Hello, Konstantin. First of all, thanks for taking the trouble to report this bug, and thanks even more for taking the diagnosis so far. On Fri, Feb 12, 2021 at 17:08:19 +0300, Konstantin Kharlamov wrote: > On Wed, 2021-02-10 at 01:13 +0300, Konstantin Kharlamov wrote: > > I just bisected it to a commit > >     3096437593 CC Mode: introduce a new cache for brace structures.  This > > fixes bug #45248 > > before this commit I couldn't reproduce it, and on this I reproduce it > > immediately. > > CCing the commit author. > So, what's the plan here? Should I send a revert? No, please don't do that - that was an essential fix for a performance bug. > CC: Alan Mackenzie (I know I already CCed, but I figured they might > not know they were mentioned if they has mail filters for example, > since I didn't write the name). Sorry, I should have got back to you sooner, but I wanted to have something to show. I don't think the bug was introduced by the commit you cite, more likely that commit triggered the bug which was lying in wait elsewhere. I've been working on this bug for several hours, so far, and have found that the "c-state-cache" (which records the positions of certain braces, brackets and parentheses) becomes corrupt while running your `test' function. I'm trying to track down where and how this corruption happens. Also relevant is that the bug seems to be being triggered by the apostrophe in bar("Couldn't open %s", to); ^ .. At least, if I take that apostrophe away, I don't see the bug symptoms any more. So, please bear with me some while longer. I am working on the bug. -- Alan Mackenzie (Nuremberg, Germany).