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#40317: 27.0.90; Reverting a buffer that visits C file signals an error Date: Sat, 19 Sep 2020 10:35:18 +0300 Message-ID: <83zh5m2p8p.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: damien@cassou.me, acm@muc.de, 40317@debbugs.gnu.org To: Jeff Norden Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 09:36:09 2020 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 1kJXPl-0000td-8l for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 09:36:09 +0200 Original-Received: from localhost ([::1]:37182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJXPk-0000aF-Bc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 03:36:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJXPe-0000Zw-OK for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 03:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJXPe-0008Ls-FX for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 03:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJXPe-0005Nn-AI for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 03:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40317 X-GNU-PR-Package: emacs Original-Received: via spool by 40317-submit@debbugs.gnu.org id=B40317.160050091420633 (code B ref 40317); Sat, 19 Sep 2020 07:36:02 +0000 Original-Received: (at 40317) by debbugs.gnu.org; 19 Sep 2020 07:35:14 +0000 Original-Received: from localhost ([127.0.0.1]:45570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJXOr-0005Mj-Vw for submit@debbugs.gnu.org; Sat, 19 Sep 2020 03:35:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJXOp-0005MT-4p for 40317@debbugs.gnu.org; Sat, 19 Sep 2020 03:35:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41118) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJXOh-00088A-SZ; Sat, 19 Sep 2020 03:35:03 -0400 Original-Received: from [176.228.60.248] (port=2895 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJXOg-00081a-Vn; Sat, 19 Sep 2020 03:35:03 -0400 In-Reply-To: (message from Jeff Norden on Fri, 18 Sep 2020 17:03:07 -0500) 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:188368 Archived-At: > From: Jeff Norden > Cc: 40317@debbugs.gnu.org, eliz@gnu.org, > damien@cassou.me > Date: Fri, 18 Sep 2020 17:03:07 -0500 > > Somehow, and I sure don't know how, I think that c-after-change gets > called with: c-new-END already set to the value of point-max after the > insertion; and with the other variables set so that that beg, end, and > old-len remain unchanged. It's the only scenario that I can see that > fits the backtrace that Eli posted. > > If Damien and/or Eli can temporarily try out the test that I suggested > and get it to trigger, I think that would verify this. In fact, maybe > warn would be even better: > > (if (> c-new-END (point-max)) > (warn "c-new-END is too big! %d > %d" c-new-END (point-max))) Unfortunately, the problem no longer happens to me, not in many moons. Not sure why: I didn't change my usage patterns. Hopefully, Damien will be able to test this theory. Thanks.