From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode Date: Fri, 12 Feb 2021 18:46:41 +0300 Message-ID: <3db967d12b06433d9c34e719ca9b26efe4c26e2b.camel@yandex.ru> References: 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="7501"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3 Cc: 46400@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 12 16:48:14 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 1lAag0-0001pJ-SR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 16:48:12 +0100 Original-Received: from localhost ([::1]:42776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAafz-0000nS-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 10:48:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAaes-000099-NK for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 10:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAaes-000641-Ge for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 10:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAaes-0004JH-En for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 10:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Feb 2021 15:47:02 +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.161314481716555 (code B ref 46400); Fri, 12 Feb 2021 15:47:02 +0000 Original-Received: (at 46400) by debbugs.gnu.org; 12 Feb 2021 15:46:57 +0000 Original-Received: from localhost ([127.0.0.1]:32837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAaem-0004Ix-Q8 for submit@debbugs.gnu.org; Fri, 12 Feb 2021 10:46:57 -0500 Original-Received: from forward100p.mail.yandex.net ([77.88.28.100]:40748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAaeh-0004Id-9N for 46400@debbugs.gnu.org; Fri, 12 Feb 2021 10:46:55 -0500 Original-Received: from sas1-c516f4016812.qloud-c.yandex.net (sas1-c516f4016812.qloud-c.yandex.net [IPv6:2a02:6b8:c14:2700:0:640:c516:f401]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 3D1D25980E8B; Fri, 12 Feb 2021 18:46:43 +0300 (MSK) Original-Received: from sas1-e20a8b944cac.qloud-c.yandex.net (sas1-e20a8b944cac.qloud-c.yandex.net [2a02:6b8:c14:6696:0:640:e20a:8b94]) by sas1-c516f4016812.qloud-c.yandex.net (mxback/Yandex) with ESMTP id GYZQdzVZ49-kgH4muBb; Fri, 12 Feb 2021 18:46:42 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1613144802; bh=kCmlG2YdPg6WIaAycHBGUeQ4VwXcHg1bcyYRm9dR7FI=; h=In-Reply-To:Cc:To:From:Subject:Message-ID:References:Date; b=BEkCmmuwr5tkYabbuoV2rG0GUFgf7rnjA27564z03EvDRXW4G5X4Y8mVJdf9V74ZQ bWATQgy/HxNrH/PwzI2Cj4ys7VIiU5aBGKOymDc8oQPa7ofr5aOVv+VnBz+sOpveoC vLM6xxYawhQJ6I8jmObJ99I4dlkObclEI+kbd9f0= Authentication-Results: sas1-c516f4016812.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by sas1-e20a8b944cac.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id hi8IeSWLpw-kfJGBgsl; Fri, 12 Feb 2021 18:46:41 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: 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:199866 Archived-At: On Fri, 2021-02-12 at 14:56 +0000, Alan Mackenzie wrote: > 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. > D: Oh, this is cool! Sure, thank you very much for looking into it! I'm definitely not in hurry, I was just kinda being afraid that the report could've gotten through the cracks. I'm happy to hear that wasn't the case ☺