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#72165: 31.0.50; Intermittent crashing with recent emacs build Date: Thu, 01 Aug 2024 14:03:22 +0300 Message-ID: <86mslwwlmt.fsf@gnu.org> References: <87o76veo04.fsf@secretsauce.net> <8634o7gusx.fsf@gnu.org> <874j8n6u1x.fsf@secretsauce.net> <86frs7f2n7.fsf@gnu.org> <87a5idj0yg.fsf@secretsauce.net> <87msm0ud0z.fsf@secretsauce.net> <86cymwzaj3.fsf@gnu.org> <87jzh4tlal.fsf@secretsauce.net> <86sevqyhoi.fsf@gnu.org> <874j86ty0v.fsf@secretsauce.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8901"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72165@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 01 13:04:08 2024 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 1sZTbM-0002A8-BR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Aug 2024 13:04:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZTb1-0003ay-1x; Thu, 01 Aug 2024 07:03:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZTaz-0003ah-BG for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 07:03:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZTaz-0003YG-2H for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 07:03:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=xLWQNrWA9FYsWR59+y2znUfKO32R1g/XL0mG0SOcGLg=; b=qLu6Wc95bAftk0txRHDzyr9AZJE2e22u5QA9m64tm0lgOS/76bks4x8RbF4L7R83tyBSB5Vc0s5/39hTfRvPEoj1Wxd0koka7I5/GEJzpvEYvXeEczMAVfdddlMGmZWyKdU0F4e5GZZy3NqNW2mo8zZO6m+cBM3eFP1NAvWdSQc8lArUzyX4rsig9RmL5SspyMiLSflfBCNT4m6C7bkwzEO4yCuez0EDvb00QfQt1UmxGMO2e2VV/vMUTfEfRdkvFRvumxUy2MLidOJIuAgU7KNYyWXjdfglI3ZabIi7kT6RLJ7Ru13m7XPYD2LcJ94wCJjl3yv4MVRmqP24/QorcA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZTbF-0000Nq-JP for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 07:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2024 11:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72165 X-GNU-PR-Package: emacs Original-Received: via spool by 72165-submit@debbugs.gnu.org id=B72165.17225102301457 (code B ref 72165); Thu, 01 Aug 2024 11:04:01 +0000 Original-Received: (at 72165) by debbugs.gnu.org; 1 Aug 2024 11:03:50 +0000 Original-Received: from localhost ([127.0.0.1]:50971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZTb4-0000NQ-4t for submit@debbugs.gnu.org; Thu, 01 Aug 2024 07:03:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZTb1-0000NC-IA for 72165@debbugs.gnu.org; Thu, 01 Aug 2024 07:03:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZTaf-0003WF-6w; Thu, 01 Aug 2024 07:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xLWQNrWA9FYsWR59+y2znUfKO32R1g/XL0mG0SOcGLg=; b=NP72RBewMx/2 0SKIvK510ORx9+tIPtDesXDAWozypwEkNbxvrnpLwfHYwwnb6VlRbeteRMt11SGiICkPxUTChRVC1 OJz/gePt8lIrS0VzGuE3FKr4VIOe/LTzTVf5OMpbmTCpTpnaGfZhw1MAO5m40pWm4ARPeAsZ6Pco+ t5Ow4BsoXnqkpNRqKBA7GzrigrVQIX4rGa4lji2jXyMCOAtXlQqk4DMY316EXeXNcFVxKEh6o+2sn v1R2yuJYFAj7fb6RZbwWLqNbGdjbjAgmxEix7xAIHf1X1HYcX2J3U9esewIAZ7dd7DOWGuDfb/5ko TTSFxr9T3y/hwETmrqBPeQ==; In-Reply-To: <874j86ty0v.fsf@secretsauce.net> (message from Dima Kogan on Wed, 31 Jul 2024 05:39:28 +0900) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289614 Archived-At: > From: Dima Kogan > Cc: 72165@debbugs.gnu.org > Date: Wed, 31 Jul 2024 05:39:28 +0900 > > > So let me see if I understand you correctly regarding what happens: > > > > . The *Messages* buffer is displayed in a window, which is > > redisplayed, and the display engine calls redisplay_window for it. > > . redisplay_window records the original position of point in the > > *Messages* buffer, then calls display_mode_lines, as it does for > > any window whose mode line needs to be redrawn for some reason > > . somewhere inside display_mode_lines, we call message_dolog, most > > probably because the mode-line format calls :eval, which signals > > an error > > . message_dolog adds some text to *Messages* and removes some other > > text from it, which invalidates the position of point recorded at > > the beginning of redisplay_window > > . redisplay_window then uses invalid value of point (including its > > byte position, which no longer corresponds to the character > > position) to set point, and that opens the gates of hell > > > > Is that correct? > > Yes > > > > If so, this puzzle has the following pieces: > > > > . *Messages* is displayed and includes non-ASCII text > > Yes. My current understanding is that ASCII-only text could make the new > stuff in *Messages* end up in the wrong place, but wouldn't cause a > crash > > > > . mode-line-format that signals an error when the window showing > > *Messages* is redisplayed > > . the size of *Messages* buffer and its contents are such that > > moving point to the value recorded at entry to redisplay_window > > produces a mismatch between PT and PT_BYTE > > > > If all of the above happen, we are toast. Right? > > Yes > > > > Can you verify that the above theory is true? > > This is consistent with everything I see. > > > > For example does CHARS_MODIFF value of the buffer after > > display_mode_lines returns differ from its value before the call? > > Top of display_mode_lines(): CHARS_MODIFF = 29606 > Bottom of display_mode_lines(): CHARS_MODIFF = 29703 Thanks. I've now installed a fix on the emacs-30 branch; let's hope this bug will not happen anymore.