GNU bug report logs - #81407
31.0.90; Crash in display_line: stale glyph_row after window-config change from menu-bar :enable eval during redisplay

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Aaron Iba <ai@HIDDEN>; dated Tue, 14 Jul 2026 07:15:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed indication that bug 81407 blocks Request was from Sean Whitton <spwhitton@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 16 Aug 2026 11:25:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 16 07:25:32 2026
Received: from localhost ([127.0.0.1]:49955 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wvYzb-0003Bd-IC
	for submit <at> debbugs.gnu.org; Sun, 16 Aug 2026 07:25:31 -0400
Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]:48659)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wvYzZ-0003BK-CM; Sun, 16 Aug 2026 07:25:30 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfout.stl.internal (Postfix) with ESMTP id C0BE41D000E5;
 Sun, 16 Aug 2026 07:25:23 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Sun, 16 Aug 2026 07:25:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786879523; x=
 1786965923; bh=YJpgnPqeRQq8QFIhf50U61tY0GKFUTfxKC9wCp3sS7Y=; b=a
 nazLE4khVJHNuOoGj0rDdhGZNBm6lzcVwXroFn91ZFvhtZmx02baYL6HF8zADjgK
 Co1f+Otq/NmC6U4L+0GRzR0Kz+pq8sge5+zyhUw59aaGreNE/UukgOteICr45fya
 Ee8GI702P8vFAv9lHDHVkMnGF/q85KQZ+/faZEYkrN6ShQorZxjQs/53kbjLSpP5
 aOj0XXzr2fFUZanzasXMwUdN7YOfItdSAu8uuAjeP/LJJFAP9J/x0SxHy5+3qtlp
 6xt615s+8SJNDWc9h/gS+xAGFJ1agyCeTzybo6lMDJ/tA5smp9bF5XuN5iHhPhiI
 XBHocydLgSQGvkP1aAv6Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786879523; x=1786965923; bh=YJpgnPqeRQq8QFIhf50U61tY0GKFUTfxKC9
 wCp3sS7Y=; b=fb6EKadJ+00OXarb92m5XKpuqEFu/Ujni82AD9rNO2Dt6rQmQNl
 8Fxl/PLba43SUFGImSYBtX6CRUTqrExq/MzZOVd/1wrIbJuvVTbyXZl9/qWGnsHu
 ujenJxPLRSTi4YyrY2yBMY6MYc0H/rCAugkuWeUD73+HwVvXuegU1vG9yCVtSIq+
 TZ4w0RbwP6tPR2sSceCpcTxOH2jVPAUTgQLR00KGXrUzoB7ZcGrQ5DLGJ6Qwjdd5
 NweGz+3Sa6IMbOyEIowFUJ/HrIb2+WjA7P3KgVBvpFUS5kw9kpVkq0H7CI77WM/2
 EGGiMxHwbxlpcciMdSHYmRqZpKIQycj+pIw==
X-ME-Sender: <xms:I56BagOzol70vCaGcHGERv0NbkHcf57LUAZUk25YCE4FYpMuq__cdA>
 <xme:I56Bakz4_vHys9_M0bIbhklyfTg8edQu7Np9cg4iaJOJuD1Fjh8z29359TgIEO-6_
 oHlTC16UmgxJb3xST-iAxjg202RAr6QxKoBNgx-4J92gAi585dZ6ss>
X-ME-Received: <xmr:I56Bahs29Zf4WAvieAAWD0e6tZu4uAGogGDlUselO_qsE6-yV-1MEu0XavwX84ACArMhBn2ReXsFBnQB-lAC2ja-KZjJqQ>
X-ME-Proxy-Cause: dmFkZTGqdv63wQS37q0b0TOe28jbVqAMizHnnfqeqTqIg0q/ht3gb4VY36WbCgOsGshXal
 FSAAs+dT5I2GiPHl+dQRYBALkL57Bw5bt9VK6HjYAKD30GsxhjO8yB9CjIrRby0kGE5wbx
 D6uyEDFyUGjTGnpQlFhacU2gSg8a/5Yy4+Q2UEmdHK1zV6sQ+8I5xmxqe4BMOVZ8ru32HJ
 AtGIJF+AF7+zNTjgIDJRohkWDRwDQJIFRkOu+WzQ6X30Kda9VmxXrPXFDMOaQUN5kJZ7L2
 a01Xo7vLTIwfNfZHqMOFhNMcJbo4FNplhMycMa4NF1+iiFYbmrtAGRTaLCNcxiGRr2BYqC
 CqfJaTCFG0jkKhOqmOzGrf7kOVw+IknI85kZenKSRvbTgyo4A4dslNIE+IaMS3Ha4CJoRe
 nyIpSFSY3kJxLQD2lCH4TM4jI9SbPuefrUIuvX1Xxhe7b7AOND6LDkinn4rd6wrZM+jjlP
 PxG9lC0FSO/TNNrWbqLyx3WEiILp/RyJG1KulNvUeR2WVzAeTRXUvfeM1o2+jDt9w41l/x
 TFD2NRF+pEHxXX5nWNEGINmW3+ban1cm+/ctCpsZ7AZt2yl5Ja4lOPJ3278zmdlN/RhgJq
 GAPYjf8XGW4JINSiLudArxO2I6vXfKX8G8UDtu6UpRV5CoH8DtaRkgjqg+FA
X-ME-Proxy: <xmx:I56Bal6ZfpswKh-6TEGGjbsnC9AezjcrboLlyL_8E4b36l3c7TXJ4w>
 <xmx:I56BaoTURGEbvIFixZ8I2Ph78nq-6D5tVIxbf0VAoA471j5ZuBHlDg>
 <xmx:I56Basr6Gb7W2RuatimY8lFF_TZTwYZeItpQ_VH5-1-hfChF3u-oIw>
 <xmx:I56BauLWq0n_uuGeQ05-XnpoJ___VfhllKWqWyf04ewhnvqpMXlLew>
 <xmx:I56BagXSZ8Vv5hImKyf5sGTIyOITJUm4q4zzOlKMDDAgbtzimA97VbQu>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 16 Aug 2026 07:25:22 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id BF222940C5B; Sun, 16 Aug 2026 12:25:21 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <861pc09123.fsf@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
 <86bjb493r3.fsf@HIDDEN> <87y0e8221j.fsf@HIDDEN>
 <864igw9295.fsf@HIDDEN> <87cxvk21ab.fsf@HIDDEN>
 <861pc09123.fsf@HIDDEN>
Date: Sun, 16 Aug 2026 12:25:21 +0100
Message-ID: <87a4qm2tpa.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, control <at> debbugs.gnu.org, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

unblock 81521 by 81407
thanks

Eli Zaretskii [14/Aug  6:25pm +03] wrote:
>> From: Sean Whitton <spwhitton@HIDDEN>
>> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
>> Date: Fri, 14 Aug 2026 16:02:20 +0100
>>
>> Eli Zaretskii [14/Aug  5:59pm +03] wrote:
>> >> From: Sean Whitton <spwhitton@HIDDEN>
>> >> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
>> >> Date: Fri, 14 Aug 2026 15:46:00 +0100
>> >>
>> >> Eli Zaretskii [14/Aug  5:27pm +03] wrote:
>> >> > He did? where?
>> >>
>> >> In a message to this bug at 1:10pm zulu.
>> >
>> > I think this is all a huge misunderstanding.  Alan was never part of
>> > discussing this bug, and I see the problem on systems other than
>> > macOS.  The code involved in this was not changed since Emacs 21.
>>
>> https://debbugs.gnu.org/81407#46
>
> Yes, I've seen it.

Okay, then, as you say it seems like I am misunderstanding.
At the very least it seems like this should not be blocking.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 15:25:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 11:25:36 2026
Received: from localhost ([127.0.0.1]:58119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wutmp-0008VW-Ig
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 11:25:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35026)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wutmm-0008V9-BT
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 11:25:33 -0400
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 <eliz@HIDDEN>)
 id 1wutmg-0004d6-MV; Fri, 14 Aug 2026 11:25:26 -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=FehLDRF5zZj5z1WlyEuwagqU+B7Bu9W0cLQkfwubqys=; b=RjCQATrnjQ9h
 EtfvndBgv1zingsbphbP/oKF/VvgInHgEWTZIPUxPcDzKwEW3xKo2hS8f4UkPA0QWVPJazyGd2K5U
 DlwdG5P0ZpCmckr3Wdw3JtG3lXim4KgXg0AmLPFK/W86kEIMKlhhsVx0IKO45O4cwuHiziB4OysPX
 JSc2YWIFPqKBuWGRhFHx3+/yYCCw7XY1Iuet0MLgPicB34MqP8s8PTwdXpfeyTouzhlMaxpdoX97a
 QEEOmPzxahBGbn1U5qtTIGpH1NbPKsBTNf8xid0TMeHYyIxxfKU5LqEhsw0G2bbFKjZf1r0MxjlQ8
 0c9YCtDDYbOe3pFQPHN/JQ==;
Date: Fri, 14 Aug 2026 18:25:24 +0300
Message-Id: <861pc09123.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87cxvk21ab.fsf@HIDDEN> (message from Sean
 Whitton on Fri, 14 Aug 2026 16:02:20 +0100)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
 <86bjb493r3.fsf@HIDDEN> <87y0e8221j.fsf@HIDDEN>
 <864igw9295.fsf@HIDDEN> <87cxvk21ab.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Sean Whitton <spwhitton@HIDDEN>
> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
> Date: Fri, 14 Aug 2026 16:02:20 +0100
> 
> Eli Zaretskii [14/Aug  5:59pm +03] wrote:
> >> From: Sean Whitton <spwhitton@HIDDEN>
> >> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
> >> Date: Fri, 14 Aug 2026 15:46:00 +0100
> >>
> >> Eli Zaretskii [14/Aug  5:27pm +03] wrote:
> >> > He did? where?
> >>
> >> In a message to this bug at 1:10pm zulu.
> >
> > I think this is all a huge misunderstanding.  Alan was never part of
> > discussing this bug, and I see the problem on systems other than
> > macOS.  The code involved in this was not changed since Emacs 21.
> 
> https://debbugs.gnu.org/81407#46

Yes, I've seen it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 15:02:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 11:02:30 2026
Received: from localhost ([127.0.0.1]:57852 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wutQT-0006mf-Ii
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 11:02:29 -0400
Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:42055)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wutQR-0006m4-3g
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 11:02:27 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfout.phl.internal (Postfix) with ESMTP id CBA1EEC000B;
 Fri, 14 Aug 2026 11:02:21 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-02.internal (MEProxy); Fri, 14 Aug 2026 11:02:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786719741; x=
 1786806141; bh=HX9W7O106yE53YOYQo9UieRUnBtrHOu3aEw3TZDmdXk=; b=H
 W5/YzoxLAcFcKm7Vzl4O9H6WZlHKIVihH8dL0iYfP/Pdo3dQmpD0AJYUXkwNwwhu
 /3IZxsKt1MFciT8OHwdnDggefUAk6xTVfpbHXShA624mVRxgraelpFQqRblDlE2j
 cTJ59nESaUAJyPO5N4+hTIqRKpQ7dpLeJW5eK2bhhrsnoQ7rnRCuPv7F3pUvkeRi
 0N8R232ZpkzG/FySM2+TlybaO9gQBOOdyuynzFP7zvDj9XDx98JpZ6tPDihstLU9
 7nrZIHPTm9JYpb8K4mkMl5TTNi7v2v9wHemUwTbNv5dbhC0rXK4XJrt6CnLVjb8m
 RfTU9Kofrl/XjthGmxcXQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786719741; x=1786806141; bh=HX9W7O106yE53YOYQo9UieRUnBtrHOu3aEw
 3TZDmdXk=; b=CvSxP3GHFeOimksLzqOFEU3oExR1ZhNHLN/m++gkoE/TLPrAzw4
 mfuQT2XfrxFfeM+IFkEEFl6cR8KldxQIRwzx6MvrQryIsRLSCS6+k2wCATkNzvwh
 dt9eOSukP+yPzB7/cL4EKqWuQIOfKr1lXFTw6CjmfAYup9AgAtuaV7Dsfkoq/9UP
 /1YhLbw/f2AyfPfQ2ZLRRYmvLShoCvvTB8R8cDhXYFxxdXYZbvfqvDigxpfpm806
 U+ogtsgeIzNdcki9p28003+RE+WJ0e20i4kAnuJUTDrFXEQngSXP+uxuPfEo6yd4
 SXMbQu7dyOBl7CSUFrRsYxZIzMkRg9k0iuA==
X-ME-Sender: <xms:_S1_aqkDD_YXAHIeu8KWnM8PLg7lUP1IRo2VtbV49Pdp0rK9Jqu7CQ>
 <xme:_S1_apRcTOEZYrSSVvi3WzwQkLjzNkwU2vvtUqGl1AC_zwAm-JmqCwZrWmM_6rXyy
 QeAwD0n7W6TRr3Ky1pHrAbuHIbOmsTajDV88pcS6GahHI7ae494nWo>
X-ME-Received: <xmr:_S1_amBrnm24LoHZVcG3KKVXOa5TTD8l3GFIPPBWHwMSXzqdpXxd9KEv7ciCuZkdiQyFg1oe0Jgf>
X-ME-Proxy-Cause: dmFkZTFNc8l+xSp3VCUb9BkjzO3rZCaLSgM3twBADyo6EbOnLwYeC48E+iN4HRfLjn9g2H
 Oj4PVaQiZ42QrAtE0lUG7/PH1nW1FtOym+JSEgRV4vJBn98pF4ur0U8p6fj1Pi0MvzCWMt
 LtjxowYN4+0dbmPKfIpWoxTS8Djp2wnmw1bkF/h2h/YjKztid2g6dC6g7relZI7jBbquvf
 BQ1mtpvZyL3/9E/bk4z+I4NIaL1FWjdMqgbrtJfmjOs8qOqNwd3wOHf25N0lBjxyDyQ7AU
 f4awyVfkcjYuKY9VqhC+rjVssEiTfliOsUPb+eU22s+XCjn0vg7FfVPeFUVX22UNJgSWBC
 U9Sa/lwPtFAsOufldUAjzGWVwjFyTRcNTZeOb0luRLYM74n4fdzqD+bXEFEYpJtW8XVIRa
 QO7VouG4MvcJ5/68mMewSWdLWuervDTvqEPFXVx2QNnoMjgdtXCyR4P5gWPudsjxhpnL/R
 TpcRizmFJ3EhBuP4G4VvSVkX9qHcpqfAmNWfP3HjGgt7ThctPxcgJHJmGuJUeOmnbyhpqj
 IB33cK8a5g4YqnhagdaE4Lfa2f4Or+cgys0c+ki7pXYGjhUdjnrb7C0Tmvvkb39b6aohPo
 NJYFZWyDu3SddGsDzWr39922sKqPiFC1Z5xwul6K1kHYM6qaqilvmJRnTKTg
X-ME-Proxy: <xmx:_S1_aoR7NiZ1btBkA64a9Pe_j0hkri_XAa8h-yfeHC0IAvQJJXH4eA>
 <xmx:_S1_asqqPPg0Vl5Drh4vBAoSUNIQbMBYp0N0QY3NHZPP5VHKgvq2vw>
 <xmx:_S1_aiy1D9wXYBsRhnFyeIP3YRUiyHrh5_b0IfEGZKcX_foj8dxZWw>
 <xmx:_S1_apK12Gmjsu9PcxO7zkp5S0JM1yw6BSSebliLMcd00ub48VHucA>
 <xmx:_S1_agkr94T1i-oh0U1a9bjQqxmxN2donwA60G4IHsWakFfYXc4voX-W>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 14 Aug 2026 11:02:21 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 871817E7396; Fri, 14 Aug 2026 16:02:20 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <864igw9295.fsf@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
 <86bjb493r3.fsf@HIDDEN> <87y0e8221j.fsf@HIDDEN>
 <864igw9295.fsf@HIDDEN>
Date: Fri, 14 Aug 2026 16:02:20 +0100
Message-ID: <87cxvk21ab.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii [14/Aug  5:59pm +03] wrote:
>> From: Sean Whitton <spwhitton@HIDDEN>
>> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
>> Date: Fri, 14 Aug 2026 15:46:00 +0100
>>
>> Eli Zaretskii [14/Aug  5:27pm +03] wrote:
>> > He did? where?
>>
>> In a message to this bug at 1:10pm zulu.
>
> I think this is all a huge misunderstanding.  Alan was never part of
> discussing this bug, and I see the problem on systems other than
> macOS.  The code involved in this was not changed since Emacs 21.

https://debbugs.gnu.org/81407#46

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 14:59:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 10:59:48 2026
Received: from localhost ([127.0.0.1]:57808 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wutNr-0006Ry-RZ
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:59:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49070)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wutNo-0006RU-Nx
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:59:45 -0400
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 <eliz@HIDDEN>)
 id 1wutNj-00079c-6M; Fri, 14 Aug 2026 10:59:39 -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=NMlY7Jb3yZubWOTxW346jK3C0AxR1LwNOeHVY4LbSvM=; b=faZe3Ti+Q2eJ
 vZ2rwu4cPAbxDBm5IMp0n1+tFY3FpxJ5bIh4cyaprbRc8WbgGX5o5zIJHA3lOVhKehaTSriNFakWR
 K8aSxIL+tOtkcLLoHfH8fa2+BDPeFcKYHZD7NJFBE+5ahP6phzj1ACY2QU5tXh0/P/wkzu+lC+x5q
 OUBaqpL2baFBRwWPOq1uWdnQ6mW2QifQ8YUsydn+x9ukOSUfeOv3Bj+zWAcnMKwSPZbtig4Q5PmKa
 03nY6UOtJkvT1Eu0qltPkqkxY37Si4gYMbx2dY/QwsNVGOQRBOjm4jEuw4OtQ2t/jsTaRmEZZOS+z
 eEnB1jIfu6FdcI9Il4HHmg==;
Date: Fri, 14 Aug 2026 17:59:34 +0300
Message-Id: <864igw9295.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87y0e8221j.fsf@HIDDEN> (message from Sean
 Whitton on Fri, 14 Aug 2026 15:46:00 +0100)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
 <86bjb493r3.fsf@HIDDEN> <87y0e8221j.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Sean Whitton <spwhitton@HIDDEN>
> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
> Date: Fri, 14 Aug 2026 15:46:00 +0100
> 
> Eli Zaretskii [14/Aug  5:27pm +03] wrote:
> > He did? where?
> 
> In a message to this bug at 1:10pm zulu.

I think this is all a huge misunderstanding.  Alan was never part of
discussing this bug, and I see the problem on systems other than
macOS.  The code involved in this was not changed since Emacs 21.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 14:46:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 10:46:10 2026
Received: from localhost ([127.0.0.1]:57645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wutAg-0005FL-C8
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:46:10 -0400
Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:36067)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wutAd-0005Es-RT
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:46:08 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfout.phl.internal (Postfix) with ESMTP id 7EB64EC01F2;
 Fri, 14 Aug 2026 10:46:02 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-02.internal (MEProxy); Fri, 14 Aug 2026 10:46:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786718762; x=
 1786805162; bh=T9bCMe6yRDRhuVw9z0a7G52qGij6hEma8+R+OCojHh4=; b=W
 LHczxO55Za6Jug3jXywHglL8I/PGhOde5Yk301uhfYpb1GidSeJvfXAMQc5Tvw4o
 0Wq8TX87xdkNmzKeulFAA9FBzXQqQnSi03l9JS+yjRBlASx82FLVG2d+Nk64s3fI
 0Z2kvosNJ93EjYV6aHayGOAZ0Sg6MJj+YzKwhwlliJ65gmqihLfoC2R1pa1nKaG4
 k/c8LzGuF/Cl3Zpg8vzvfjs08H/ZRk1J2OmjOMA0YdeacX2sPOZrL+Vg8K4C8rY8
 NCig/LpOmilqWrlWpDbGswiIFJq8MNS4Y2oGwLWDqE+3shMTblw9Pa40t4lAN2DR
 xDbkM1YsINseI2khHTXag==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786718762; x=1786805162; bh=T9bCMe6yRDRhuVw9z0a7G52qGij6hEma8+R
 +OCojHh4=; b=igDbngkpCR2hqvCk1Z3cCw6wC3KnTjOEmhdW3qdOdiHYphMTF++
 TAM5/VLT9dh9T3sbXxetsrAp6rRoO02GPO8rgeJmxi1ysuzxr0ihpAcxgxUeRr8Y
 OHIEPZaxJuCsL++NYBZs5575XEMpWEaWMRVX2K7cg5EcRZbq5XTueQ++pEGs6B3d
 B4ccZq+uMPC7gxcuUL6bnZosceqzv1c2K2GugQJNU3yJhE6fihLAW7SmPdjrr3ly
 rWP0GuBW/ddnaY1q0seYxw/e5LuXtcmvHJziMimLmsDA3IMX69UcdUSaGO33tUHf
 VZ0Duaih4lx3Jyw0HsoqUGjiNWqDAHPEzaQ==
X-ME-Sender: <xms:Kip_aofkBvXxgs--dUC_BbxqttZaPvk1MZSuut9ENDhFHBfD_iAY0A>
 <xme:Kip_ahqPhvV69Rjraos1aDCNRMevYzkpp1t1FFjr2TUur_Qa94w_3o70gtC8jnX1A
 Ql_DbVEuIq1sDxsrHehaIoWCkKGP1v-q0xmd5fMqMSd630GYRAdrg>
X-ME-Received: <xmr:Kip_am5SUhthIpnEXqxbomLf0s345DKbZt7FiGeANdmBinAcx59jbCE9kThsoL7qu7Ahy2esHgI_>
X-ME-Proxy-Cause: dmFkZTFQfNgcC5jOG+Uo/H7egODTdCiKA6fHu9ZxuWxn8AK2FkuHA48AwEbAKXfFwYwYzy
 hjt0Oyvsa3nkwn8Q0DR2o/jzfcKg5ShiBSg41VKwX6CEKYlIn4R4qmKfyQEWoATQWG2NlD
 r34poxDPNjSes2tTKxL3rk0bXVhVQ4mBA2LHEt5hXdRc5cXDdRXTYf29ujw76iNQfDaT0I
 m9ljHI0danzuOAv5pkXLYFzfuai3EoBAWbDT+OvoL1sgokaD4tEvBp1SO5hn6HpQ+9+jkP
 BOPleys5gtN9R4HXjcj25ttGW2l7zHY+97IzIL02ABxz5W73nmLhqOQtPTP+E19teYw7QI
 GcvW0tOtophDy8MZRznNcMLXDvD7LzHAR4x3e4iyLiu+v/nHQmRURdNWgDNqYHhnmE1w02
 NRSIg96MB1eNtmmiNmpI4IdvGJrEhL6vq3Axn9IamXyO6670LRozl7aOktqV4Z7UCSzg+w
 FN1cQmtcCLyraiWflDMWI/E+oNXlH7wi6hlFajcaLRIBPEmLXVKIzBi1zGMSFqiZTiMKGJ
 5HKsPgx0ES+vlXESRzAyR2P3gE43KfNsg933NsPBj2pTDnAb7kv1BUfuNFsjt1+WcNH0fW
 NHoWvk9TceqegHSj80guob0y+WUHij6LjuipLbYohPBifq/xH+an07g8VmbQ
X-ME-Proxy: <xmx:Kip_anpwTuK_EJSxw3DcYEDI5ZdxGRk7moF5NfGbXOqVaC-NWPeRFA>
 <xmx:Kip_aoj7TLujKS9wtOWdoxX-xfDnJfusQUa6BZzj-zTpP0n9cmkIMA>
 <xmx:Kip_ahLKtMUCWDyEkoe6QAMOWAffoRO3T2wLmwu5fp9keBpkcU-J1Q>
 <xmx:Kip_aoA_8e1qaM0xy-vyNHFyaDGP-aGysFHHjdvtT3-NSlGr9VwDIQ>
 <xmx:Kip_ao9T3p3xRsyBY9EmsWe2Xn-pNa4PEZYjXmYtf4XnjvC7lr7TXo4e>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 14 Aug 2026 10:46:01 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id CC1127E73AA; Fri, 14 Aug 2026 15:46:00 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <86bjb493r3.fsf@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
 <86bjb493r3.fsf@HIDDEN>
Date: Fri, 14 Aug 2026 15:46:00 +0100
Message-ID: <87y0e8221j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii [14/Aug  5:27pm +03] wrote:
> He did? where?

In a message to this bug at 1:10pm zulu.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 14:27:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 10:27:24 2026
Received: from localhost ([127.0.0.1]:57496 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wussW-0003u4-4B
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:27:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60350)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wussT-0003ti-8L
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 10:27:22 -0400
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 <eliz@HIDDEN>)
 id 1wussM-0007m8-Fr; Fri, 14 Aug 2026 10:27:15 -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=yoA53eUZ3VDz6Cq1amZTqm4bwEsWE1XSWB1savxO3i4=; b=odtgIOiqkfbx
 6se/5YHjJhEbh+j7qhc3/IslADE34y0PDJdJZx4kvMLEek8SFBXazJIkuTSRV3sR+Qa8J3JsFEZ3m
 l7dv4B6yKWm/LAAaVL/Y7dzR0xUO3KOFnQ7kZfAK94ByoMk2SKD1P/gqF4dY+cBF0oxyJEdSDOfqy
 6Lv0HtYagZgbQsukizwkDvxlbFWhop3HazP5jvm26oaqh0YX/B7DXM15Kc3kE7piNwWTuxNtIR+xg
 E09JNSVgFR27bZu0xYPsRgayu268kkNaBOdDonG9bx5ydwvUqHkMw36nB0kQMQiwImwXwvqYfFWCT
 2FEza1HTiStmuu2WovFr7w==;
Date: Fri, 14 Aug 2026 17:27:12 +0300
Message-Id: <86bjb493r3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87a4qo3jjs.fsf@HIDDEN> (message from Sean
 Whitton on Fri, 14 Aug 2026 14:42:31 +0100)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN> <87a4qo3jjs.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Sean Whitton <spwhitton@HIDDEN>
> Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
> Date: Fri, 14 Aug 2026 14:42:31 +0100
> 
> Eli Zaretskii [14/Aug  2:37pm +03] wrote:
> >> It seems that this patch makes an improvement; shall we install it on
> >> the release branch?
> >
> > I'm not sure.  If anything, I'd install on master.
> 
> Well, perhaps go ahead with that, we can always cherry-pick.

I will think about this some more.

> >> Also, do we have any reason to think this is a bug introduced in Emacs
> >> 31?  It seems like it is probably older.  I don't have a macOS machine
> >> to test on.
> >
> > It's a very old bug.  Basically, no one could expect Lisp called from
> > a menu-bar's :enable form or from :eval of the mode line to start
> > deleting windows.
> 
> Alan would seem to have determined otherwise?

He did? where?

> This is our final blocker for an RC this weekend.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 13:42:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 09:42:39 2026
Received: from localhost ([127.0.0.1]:56610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wusBD-000164-4t
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 09:42:39 -0400
Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:60037)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wusBB-00015p-Dc
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 09:42:37 -0400
Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46])
 by mailfout.phl.internal (Postfix) with ESMTP id 40855EC001B;
 Fri, 14 Aug 2026 09:42:32 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Fri, 14 Aug 2026 09:42:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786714952; x=
 1786801352; bh=c+H2vNZnniXFs/xX2krz3yYkwZy/St89bhKzqv6g9AU=; b=l
 wUmosWedxg9MjkORK8dQxwt4ipW1xzPDSAagwJko0bLHaQI8PImWu0gLBGvWPZu/
 8xa7tzD7qqorssoa3Athi1hvTqir971u+/KB6qBQ5gnpuucEtc8IGrH9NbxxLDAK
 nyUL8azhRlgEp5iYtsSN/1zR67kNbvHy1I1qO0rKIhoB28VuVifDruAcNwwTiJfg
 GjeMrIxvn48iEvjN+Dbk6z9J7yuFG3UtP+yYTCgd60Hyjsg2pseZOEhYL/k16Ok8
 UBs8+oZjJziVZ7Ew/kgc3hLZR+D7KNt7mfmu4wZeBrcSJSu0Dx4HDCkcg+c4hpTC
 +TZj9M0aWgtABuLpK9b0g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786714952; x=1786801352; bh=c+H2vNZnniXFs/xX2krz3yYkwZy/St89bhK
 zqv6g9AU=; b=fz/h1ibCt8jepBUxsOl2/azw3Lwp2LV5yua3xs6pTRU/pIQeXA+
 nlOWa1AR7Fk/Hud0rAi0/qfl3/nroSAYs1qVGBUDT4iImTk1XA/wQdWNiOov4vI1
 esF7WwXEp3alYJy/uABJvEKkoRIdtPN/M3JLGlPSVgl4z9h1xFwVg0/EXyYtVDEC
 f8fIGaQ020v8wLUlEmz7Rxnhq3ftvc8XFM0Y96Ls7EH7utQZKEe1YKxCQAHFSF9G
 p3WffFL0XtlDiU362/5eDab9zuMKi6cyhVoDgBwmdlZDukaPTPV4uW5AQC7sxYBp
 KWNcgLv+MAEYdtYlmku+SK/frn/YgDhONHg==
X-ME-Sender: <xms:SBt_avlxjn3Bptuz3YKcBSr_kbOufFK_HD_I67RoPoR_Y4EnSRwEkQ>
 <xme:SBt_aqQ0aiHfcErHJBoBgLLi5u_9t4-Twu3sKMPakF7GZ933BcngypNWPJbgO2giX
 iOBzS1fOsIkNzqc7wPKhUtle_ejzy78jKC9vLlCq0hsAXrbNB-gnSQp>
X-ME-Received: <xmr:SBt_ajDKMZmOni9nSeMnH1k5U8-rMi7f9lUnUln2oZA6plaSV4aAvAS4Mcnm4RCxjywS4i09UFS5>
X-ME-Proxy-Cause: dmFkZTFreu6U1C+hF920Rk4xAkAXhCGx510pumeO9V7sjNmr8/zGzNkk/Mz74TMAq4jZ+t
 K+1pYDCPSghUb4AUfz6MGxXDgnpP6AC9qB4tvUCV3LNExm/hKxuTG6Rz6xaNY/xeCYwLXn
 8JyDMBAARznnuRswqGIXuaAaT/WF3DE2YyFkKwyBjSG0e1ANrbfmmoMMn79JZ+cKR9uvpY
 FjYT7ijvvCyFMCpdTVbJcHeVZoqq93l3S+pdItcb/uHOXHylGtHWx+TSDjZuGXLZ8GyR+v
 0hFOcxlxuU7buRqMQZCsL+0QnGYQmFBKn8re4+02qRGEwoqNllX0eaF3pDct4f22O0w1bH
 8u+PD0lL6Z/G2jLWdo6oLU5IERfD0RZKf76nq5Caz0uaTM2t2l81PreHsdhpSfwnILm+AO
 dEnEgiSvhiqYgwWODyJnAC5X/YHrGwh5ZClbQ9Zl4LcV/x0VhIVgTX3kWrAkPHdAEODRki
 1geMdCjZ75Dg38K2/HT12z4E/Fp0vUSaAZo1ad5NgV99rrmogwfCFDHR/o69loE6CNkDOG
 gPNuE0ViEGevZUdRFxHlFHY+8qsC0z5mw2JKazAZ5aicrduQ5NwC3nFqUjkk7bDJSkLqvF
 Vc0yV4NGRpWN/xF7EPkP0lJN+s6KMlYT7hqrx9Nj/znvajCU2wVPCnLsyqag
X-ME-Proxy: <xmx:SBt_ahS65OKinErnjQObCO2kbdDcFI97d7eM3N6kXHEELBgEFTJGrA>
 <xmx:SBt_ahquYmdqHo49cY8Rv_0UQRPcPyoXRPf47QvysRNsFj5hjadezg>
 <xmx:SBt_ajz--MNR5q9ev7mTKMNZATyJiNt9-J4UtsAQQ-g6PkYKZ0yxRQ>
 <xmx:SBt_amIxkfoLCribh5h1dQeNhJ8DZpZypUotP4W8lVMFiRDWqhMFFw>
 <xmx:SBt_ahmTkxoa6qq5WkgMglmXwwpra-wq_sQ7oys7zFyBa2WeMG8d02N->
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 14 Aug 2026 09:42:31 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 190F67E7E5C; Fri, 14 Aug 2026 14:42:31 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <86jypt7x11.fsf@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
 <86jypt7x11.fsf@HIDDEN>
Date: Fri, 14 Aug 2026 14:42:31 +0100
Message-ID: <87a4qo3jjs.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii [14/Aug  2:37pm +03] wrote:
>> It seems that this patch makes an improvement; shall we install it on
>> the release branch?
>
> I'm not sure.  If anything, I'd install on master.

Well, perhaps go ahead with that, we can always cherry-pick.

>> Also, do we have any reason to think this is a bug introduced in Emacs
>> 31?  It seems like it is probably older.  I don't have a macOS machine
>> to test on.
>
> It's a very old bug.  Basically, no one could expect Lisp called from
> a menu-bar's :enable form or from :eval of the mode line to start
> deleting windows.

Alan would seem to have determined otherwise?

This is our final blocker for an RC this weekend.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 13:10:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 09:10:34 2026
Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wurg9-00074R-Gn
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 09:10:34 -0400
Received: from dane.soverin.net ([185.233.34.158]:59371)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <alan@HIDDEN>) id 1wurg5-00071q-5S
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 09:10:30 -0400
Received: from smtp.soverin.net (unknown [10.10.4.100])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by dane.soverin.net (Postfix) with ESMTPS id 4hM2dp3DZQz3w;
 Fri, 14 Aug 2026 13:10:22 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by
 soverin.net (Postfix) with ESMTPSA id 4hM2dp0dwWz9q; 
 Fri, 14 Aug 2026 13:10:22 +0000 (UTC)
X-CM-Envelope: MS4xfAhSxkVaNfqsrkKzqmgYHy0sv7nxTn/zQLGRWtFjiWFEsS8dzMbe1hGzqxzUxa8s8cMKXzvSjNvtM9/FyG1wc3PL6BrldhUqJea2YdLWx/ag3xft7VGv
 lDJWdiiedb796PYsE5lc08D2EVry0EAE1Z8hdK6076VqVCq/KcHpBqsYXB9Wnw3XnyUkFv1sgpwBw1NvUgS1qrE+kz+IzMPhLTKjT0EvgrqUt9fqYZMv/lxJ
 5MIXKmYNvZEkrs9+X0ucGGPzyo65Lt5U+TbevEulLrSx3RgvVFaXOARg6pIecTuo
X-Soverin-Id: 01a00065-1e30-7e99-8ac7-cc9bf2b4c795
Received: from localhost (namib [local])
 by namib (OpenSMTPD) with ESMTPA id 96425a69;
 Fri, 14 Aug 2026 13:10:21 +0000 (UTC)
Date: Fri, 14 Aug 2026 14:10:21 +0100
From: Alan Third <alan@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: testing for #81407
Message-ID: <an8TvRIcYO8GFkkO@HIDDEN>
Mail-Followup-To: Alan Third <alan@HIDDEN>,
 Sean Whitton <spwhitton@HIDDEN>,
 =?iso-8859-1?Q?St=E9phane?= Marks <shipmints@HIDDEN>,
 81407 <at> debbugs.gnu.org
References: <87o6f52ayb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87o6f52ayb.fsf@HIDDEN>
X-Spampanel-Class: ham
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: =?iso-8859-1?Q?St=E9phane?= Marks <shipmints@HIDDEN>,
 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Fri, Aug 14, 2026 at 12:33:32PM +0100, Sean Whitton wrote:
> Hello,
> 
> Would you be able to determine whether bug#81407 is reproducible with
> Emacs 30, please?  Many thanks.

In 24 runs I got zero crashes in emacs-30.

For comparison it took me 5 runs to get a crash on the master branch.
-- 
Alan Third




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 11:37:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 07:37:57 2026
Received: from localhost ([127.0.0.1]:55659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wuqEX-0001Ef-0U
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 07:37:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59192)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wuqEU-0001EM-DX
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 07:37:55 -0400
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 <eliz@HIDDEN>)
 id 1wuqEO-0007L7-TY; Fri, 14 Aug 2026 07:37:48 -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=idR08+TrBspOcKJi7ewhR31ArIgURfXIR+3CzZzxa+M=; b=UrU46F5eFVpK
 PIso25IgbYA+f0lqiiYP8G1BDoMHRfJ54jYRonIr12n535LTD+ZcDjPlOhIWMyz3foWB+Djj/dqHg
 6j72N6n1G2ZXzLcAgM6DRIx/sD0HA4o6CF5bjVBmu0UgwC0K74504hN9VMvwYmXwgkzjzKrXAyBUa
 P28Pinuzyn2B0Yq4OH71ZS58tGrYl54vdkl7kWLS0Bsdiwax2peBZEqbKGRhNGRiJpIH08J07S0Sw
 Jyr2Uftjx0/wX4wjVV2u7nWOLeImFMQOz62DDEm8g6tRSdPD9XDXeOhfeV+T6TlOxCJ08KH8xXqWN
 7C3abFLDTFLMJjvKLODnhw==;
Date: Fri, 14 Aug 2026 14:37:46 +0300
Message-Id: <86jypt7x11.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <877blt56re.fsf@HIDDEN> (message from Sean
 Whitton on Fri, 14 Aug 2026 11:35:49 +0100)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN> <877blt56re.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: ai@HIDDEN, 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Sean Whitton <spwhitton@HIDDEN>
> Cc: 81407 <at> debbugs.gnu.org
> Date: Fri, 14 Aug 2026 11:35:49 +0100
> 
> Eli Zaretskii [16/Jul  1:05pm +03] wrote:
> >> From: Aaron Iba <ai@HIDDEN>
> >> Date: Wed, 15 Jul 2026 09:23:56 -0400
> >> Cc: 81407 <at> debbugs.gnu.org
> >>
> >> > We need something smarter, and perhaps more radical.  Let me think
> >> > about this.
> >>
> >> Understood, and agreed on the infloop risk: in the recipe the second
> >> pass happens to stabilize only because the rows array moves just when
> >> the window exceeds its historical maximum height, so a retry
> >> succeeds; Lisp that alternates between two window configurations
> >> would defeat any plain retry scheme.  Happy to test whatever you
> >> settle on -- I can reproduce at will, both with the -Q recipe and
> >> with the original configuration.
> >
> > Try the patch below, it seems to avoid the trouble here.
> 
> It seems that this patch makes an improvement; shall we install it on
> the release branch?

I'm not sure.  If anything, I'd install on master.

> Also, do we have any reason to think this is a bug introduced in Emacs
> 31?  It seems like it is probably older.  I don't have a macOS machine
> to test on.

It's a very old bug.  Basically, no one could expect Lisp called from
a menu-bar's :enable form or from :eval of the mode line to start
deleting windows.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 11:33:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 07:33:43 2026
Received: from localhost ([127.0.0.1]:55640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wuqAR-00011V-Fp
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 07:33:43 -0400
Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]:42879)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wuqAN-00011G-SW
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 07:33:42 -0400
Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43])
 by mailfout.stl.internal (Postfix) with ESMTP id 3FC9F1D00281;
 Fri, 14 Aug 2026 07:33:34 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-03.internal (MEProxy); Fri, 14 Aug 2026 07:33:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:message-id:mime-version:reply-to:subject:subject:to
 :to; s=fm2; t=1786707214; x=1786793614; bh=1XqSPN/KgDSGelTyCYceV
 yLmEXU6h3legMt5KkaE7kU=; b=lm5xs48gSrNKAOXBcFdEckDEPekfRI8nThisX
 04wB71tqrC1cTMVAbMW9n7hD6Txp1JQta3OoN+3p5rGjyDHg2pvRl9hDXQMWLoQB
 KDdwQPgrfhcWKGBJ094KjqJ75e9xXR1qtxoTHtbTE5u/dyvm8fJ6cM8yMBR4HFh4
 i9+fSe7ODpc/dX/4w/flsyjmbYRdA2psTyyP1EUakSmRYnlpIE8T6wrLHOyWhDOy
 +8Nc9V6hd+w/3xy9WuQ7fYfTGYbh1/7nfrDsUvW6IRAC4eocibYNTAsIvpZksbQw
 7wRj5Keny5X6wYMXIITnG6Xss/pNweGhQA/AQi9RAfruIbgUw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1786707214; x=
 1786793614; bh=1XqSPN/KgDSGelTyCYceVyLmEXU6h3legMt5KkaE7kU=; b=a
 xfpD63cN+oV5IjaCDll2Qsm9wSZLnbxjNJnv8oUlCZEWyTHFwompGspWO90k8ZHN
 iuRzawrBY3WkRCXdT90tCDZtL+KMnOnOA1wKLA9GSRcYVTb3osu6sXjFSZYsnOI6
 WZsGQtZX66YvxKSi/10jaf4qcWd4Ui8rUl54AsRndcVAtgHETHEvVgpnrb2D5ZVN
 KD2VEYf89vRFgI7c9ULXp0afRF9ckeCsvNlgRNlbpL0dWMuuv8yERCJs/htlIeY1
 hhvaLj0wIrcJ09eW/7g9nqABs2mLeWU+ij2eErmlRFiJIUDhviG3QUpbKvNaE1P+
 ZD/Y/dhJuoyu1yjqVbddQ==
X-ME-Sender: <xms:Df1-anhJyll1Jt9XVHfN_MXcCDziqbmrmQdMyHYFCCaWun67AhTfUQ>
 <xme:Df1-arcPlXXXNfK9I_CxttILb2XK1t1l9XcZY7X-uOg5ZegGkCPzih6N7g11oTNnQ
 F84PvNuMqGXsjn2J-BKeI9qQJOjwaZJfM3aJ2xn8Ocf7Z60Ww8tWnv2>
X-ME-Received: <xmr:Df1-akcjyF_RhN00JWritzCbXBoScE68Y_hWizA3nEi7yNPY4WM9O0yl3nSUkXXEkr_jNME1XUrZ>
X-ME-Proxy-Cause: dmFkZTGKZxn/uvKS4SZB7cUZzWgKy3tA6RDlYepvWTSbgoTCoi7Xrg9Kz5BM6Lnioq5Uy2
 0f2dO+yq08JKsaiW7XIy2pX1A4wVJ//BfywvOS7bBMJKvDtWKalt3xW613St2vGx0NOlOo
 +dgUi4g3cLuY2lNm8BsWc3EeTlubc/b16ZucqOZomqxeX8I8JcHGpUMHkWD718qShNFBJS
 MqFaqZ1hiAvQpDuDIuYTMXlzsJEU1TcHADg1WpDIGPGBSCv5zjyWKKfVVnXT+RpbW6EAlJ
 r2YhI/d+73c69wSCu9Gp+KDDDopCgPvk5pfjvlyPnv9NC241uBNqHjT2CMyBXbtvecylKm
 wwn+/dlEs+J3othUxYOzszKD6vnYy7ToWkzYxmRgd1WcRX0/r/skGQTtgyo7HA9DSstCPs
 Q/U2zigHioWzw0uvIus70f2HpJz7uRpaUvA8BDQCjpo1L9lZI+6mVH/nGWhqehwu/Za4bm
 phOOF5u3yb2VoT18G4vw159YIRtu33Mk2Y2dV+uMtkEGlx8wKwbumHgBoGhPUpRTGPJRcd
 ZnkqUP/UvTFZQ1jkPtlIbTIbakn/MDfd7fFKyd0GtenT4bUQqJ5IYZJxQfi7eYSPVlF43i
 TMyX+m5Rqhtwa8jn7s7gYP9LaocYzscujb1F2r709Gv08wWtFKQL5XJFcvhA
X-ME-Proxy: <xmx:Df1-at9SJ5hvxbyTaYPIkzlavR035Lnu2gUt_IuwF32PC3JFPIlZqQ>
 <xmx:Df1-aokeKE-0pHAcjOHix_ccutPbsAvpftz61_IxSZe7p6wW_HWYTQ>
 <xmx:Df1-an-XYb6BbI4UPO9kjNwqair5adc1lo7kV8yobu3Fnyfuj2gsdg>
 <xmx:Df1-aumkkPZlzyF0eDPabzz_JN33Z4_nQ621OwBBPSgHAs3W9Su0Yg>
 <xmx:Dv1-av_GOW5jA5fR2bcD1AKDgdM0-NUyJO-7_eLhwzOAtNLsLcnK2FRd>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 14 Aug 2026 07:33:33 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id AD6EE7E8E48; Fri, 14 Aug 2026 12:33:32 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: =?utf-8?Q?St=C3=A9phane?= Marks <shipmints@HIDDEN>, Alan Third
 <alan@HIDDEN>
Subject: testing for #81407
Date: Fri, 14 Aug 2026 12:33:32 +0100
Message-ID: <87o6f52ayb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

Would you be able to determine whether bug#81407 is reproducible with
Emacs 30, please?  Many thanks.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Aug 2026 10:36:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 14 06:36:01 2026
Received: from localhost ([127.0.0.1]:54969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wupGa-0000YM-0P
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2026 06:36:01 -0400
Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]:35783)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wupGX-0000Xn-3Y
 for 81407 <at> debbugs.gnu.org; Fri, 14 Aug 2026 06:35:58 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfhigh.stl.internal (Postfix) with ESMTP id A6DCF7A031C;
 Fri, 14 Aug 2026 06:35:51 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-02.internal (MEProxy); Fri, 14 Aug 2026 06:35:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786703751; x=
 1786790151; bh=R4EdNQGkYYoSkHWKhQpHODJ9/Du92fA02zVM+yf3c+k=; b=g
 B23Q8Ri8tmxO95gEJqryHCzknPANSTtZ/Uh1bvuCisGnn+Jzb26DwIdOBwJxKWWA
 DaejuGEmDAGkSJqbWNQgWXg59c4iXZFnpveICsJkHyF8oyCnw7jo69R/utN1h8Xr
 cIDDV80KwhDG1A7sgdvRBffWaWWY40qkIh50AXzbJNlYWuY+jjAuiq4kLfSr7Y3x
 0KD53cCAJ41IZvBa9i5HfixHLUn2i9xHP9aQSX59+Bin6c2TIJUDStSAysI7f4tK
 D7s3g10B+gaMbNobPrUFEjdh2wl0Rahv71tRAuU4GgBLXLGvWXRFowPciALqRBGg
 FUunOoylj9XGzju7zmCKw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786703751; x=1786790151; bh=R4EdNQGkYYoSkHWKhQpHODJ9/Du92fA02zV
 M+yf3c+k=; b=IpgmoFSzR7ZJ5eoYOH239NwhLInC3fIIoSjsC+4E504U4vpA/fQ
 Vr28N6hWxNSUwdKVRzC7YI1DVA14PVOIjnpVJJC4VKZb3JAVphhrHIewgzmKRgEk
 dp2XzUzODDBNzmpci+PnTtaBmsll5+tWM5ZK4AP/34JNVx774B5OAOJkHp4EO3GG
 VRDvX8+TpN2sJfT4l1Z0yA5rkK6vnwyMITdyfBC9xoCCHeqcY4T50aI8Tg7wQiPT
 VtA8tFkbGtG9ptcgaJuG1d3QTgraIyTnNGfHQPAVr9rhTJa9abaRpHwA/5E35pSK
 22fNln43kmDWSkGse0lyeldwmlxN1eoqeAw==
X-ME-Sender: <xms:h-9-arxn-yykXg7A5ETJ_4QTOlpPIxzJnfMom1NAKMf6mBxO86y33Q>
 <xme:h-9-aqsKYGHsBy4WQ3AKZKTiglOPJfgBvOwkwMSjim8Dxm-xSj4CbOgN1Z_UMlmJp
 gep7qM9s4YNLBeXx1Dh6vcFJDKh2y_Kmgz17ubHc_Yf-_SKC_3L4oSY>
X-ME-Received: <xmr:h-9-ais1nBM4B15P5LnlIasrK4zQgdguduPqKQGFZOKMh8WGHH6VjsSbqw-P-3Y9ud1KeujcsO8A>
X-ME-Proxy-Cause: dmFkZTGkHzWBGWlCEuf4UbbTzL+kiHFjGnFM2MoDKA9ukRYoX634OIl+6Xz/EXsxKPesfW
 1UNAquhn0c3+LymMzGwii4Xt3/6HtRZ1NQ+2HS+AppKjNEDGwGcucRIxP2HC+KekFE1Tg7
 skAYVDxMWvfFcNmWTvO8Dk1ohsS/Q2QaLzEXsadlO64D++8sMrJ7B0H3YOeLDlTYJz7juq
 Cm+eEjVX2bn24dd0USdykTd1x3Lfw+Azi+/XEVRKq55GHnC3i7R/Wx3HNq0Ivk6K1hAias
 GEN+vptEtfsZtVtaADV90RhNUzieijKAe5FHJniEAr6IGzwHabolPKgAui40uFH9Ag//Wf
 vODKFCRWvIMVrpGm0M+7OmNYH/rwblDiAe5V1Ukuc6rasJxSroGaPb1xGRtIF6At9c6EMc
 elQNNpnZklcRmVMcgenJ4t5MVeUvIgxSXkj+OQJW1ej+dd1tUemJOnd/9Zq7GsPmADRDkJ
 Dwh1vpLIKzP63AGNuDBFCGUMVFO29YKmKMfc+n9ykS85DMrogzqlXLh/sSqJajOp9Rcoe9
 3L+prXv6nBR5O+aZm5VO1dAvm9FOEqYlXA5g1su1MrF94Xf0NoyreTd6af9r+dXMT8QwJt
 v+1pg5Ms+GlsFx/lmXXb/fuGk1rn3hZ1EPleJcam9w+dZPkV0TGfmylp1wpA
X-ME-Proxy: <xmx:h-9-avPItee6MkYDgWj_WfK7tWKNftKePPxT3xKFs-pc6JN-9fUVRA>
 <xmx:h-9-ag1dVl80iCLsZ0C1jwJFgAAfdQPEAy6XryalJS_wsCjPR64PMw>
 <xmx:h-9-arPN7EcegaRc58g2QNhVoElSO2C2AK-G9ATuv8cpk79F_PkdwA>
 <xmx:h-9-ag1xeamBPLJy3ezvOHvL8BDg6YsdMA9NWE06EuDx618ILjlqJg>
 <xmx:h-9-aiBIxFogfp6dUh8nrDpDS1PPeIXmgAFcX6SiDgwkvqV8FmBPBmZc>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 14 Aug 2026 06:35:50 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 76CF87E7422; Fri, 14 Aug 2026 11:35:49 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Aaron Iba <ai@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <86y0fb1c7m.fsf@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN>
Date: Fri, 14 Aug 2026 11:35:49 +0100
Message-ID: <877blt56re.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii [16/Jul  1:05pm +03] wrote:
>> From: Aaron Iba <ai@HIDDEN>
>> Date: Wed, 15 Jul 2026 09:23:56 -0400
>> Cc: 81407 <at> debbugs.gnu.org
>>
>> > We need something smarter, and perhaps more radical.  Let me think
>> > about this.
>>
>> Understood, and agreed on the infloop risk: in the recipe the second
>> pass happens to stabilize only because the rows array moves just when
>> the window exceeds its historical maximum height, so a retry
>> succeeds; Lisp that alternates between two window configurations
>> would defeat any plain retry scheme.  Happy to test whatever you
>> settle on -- I can reproduce at will, both with the -Q recipe and
>> with the original configuration.
>
> Try the patch below, it seems to avoid the trouble here.

It seems that this patch makes an improvement; shall we install it on
the release branch?

Also, do we have any reason to think this is a bug introduced in Emacs
31?  It seems like it is probably older.  I don't have a macOS machine
to test on.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 4 Aug 2026 14:04:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 10:04:52 2026
Received: from localhost ([127.0.0.1]:40467 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrFlD-000850-HB
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 10:04:52 -0400
Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:49601)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ai@HIDDEN>) id 1wrFlB-00084b-0D
 for 81407 <at> debbugs.gnu.org; Tue, 04 Aug 2026 10:04:49 -0400
Received: by mail-lf1-x12b.google.com with SMTP id
 2adb3069b0e04-5b0117d49dcso5267820e87.3
 for <81407 <at> debbugs.gnu.org>; Tue, 04 Aug 2026 07:04:48 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1785852282; cv=none;
 d=google.com; s=arc-20260327;
 b=ASp3fNnKtYETP9bjMBVhljamtnU6H5osl2WvbrvMMf5DFW4dUAaKhwJkyk5mj3L17K
 GLuBfSo0x+OWSabj1J0lcmihKASOL6nhyie6hXWeQddCYxvqalTi1bx/Cwuq91rfPsKS
 qTG76JRf6eDqNSjXy286LGBXY7fd16klWGarVvB+3dYQzA39oMairsSleOr70/7ON3CM
 Pc/4d+EzibwS6fDQv6ZRgWqORbmh4uAgqcDMvj7kJ1hSNeRJb6Cgpun7VcBfCD2uRw5x
 KlYVsL7uiW9FAB1Qj8jrrT0Ml/Z28+LG9KMGXs1NzJ4j+akVC7F9X/FyBeQ5R1o668lL
 2p/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20260327; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:dkim-signature;
 bh=f+hgGuF83qj+CVYq0Bp5teX53gO/bQQXeAnlpVCIPXw=;
 fh=E1mpT6rvccdR4r/KFkbsjcsUW8fJe6FkaoIi2mehYwI=;
 b=Jerknn+4RtAIXYTTPHxjCXZzOykUguA5brCeYcc5gT6DLTlYld80CWX90MfpCjlNrz
 bpsnaGyxDWpRgvk3oBFytUZZx4CVV5PuEWJnkrkcR6xymWdzhPWPlvuicm9xWdpfygyG
 9jI1ff24CtVTAJeBqiy/fRaLfTd/axFx0W1WfdFzZjHGeiT6DfD/U+NtC1zqnXPllrPo
 j4UlGZQyRawbgM30eWJel2rz7fFxe83C7e/jyElrAo/0kKdU3aqGHQ8B9D7C5CwvEO3+
 vtosdkg/YNmal1pIqJXgL1QSGIFtqnfHyCyIK1Jngbp658gMEvHmqomp+CsvjsmU65hE
 Uo/A==; darn=debbugs.gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=aaroniba.net; s=google; t=1785852282; x=1786457082; darn=debbugs.gnu.org;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=f+hgGuF83qj+CVYq0Bp5teX53gO/bQQXeAnlpVCIPXw=;
 b=Br+NydE/QDrWcfTMyRQ2E9iX0b5tVZlh0Z7470JbIuA1rQ87jp0SaYgrvrr0JCzspA
 3eFjM2DM8bW+sZQImMVssyXztjdW6EZ+9D9XkF/e4CzeYcwFYAgEO2L3SoBbHiPfWqk3
 aqf2Odw2chJklqUp9QNWVbroQtSUa6GDZUe7zdlWsGYUXOItB46syHBUdSPjicT9r440
 6kVNQwN2quVP2tOJQ4o+wuKDP1G/krKTd+l4uI/EwGN6mhhP07cfV1+WZY9LhTIRD+0m
 ico8mZRdtjOM4P1mRVJbBtGF786C/PqaDeudi0O0THz3ES7R34BovA2py/iD3M204CAc
 742w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1785852282; x=1786457082;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to:content-type;
 bh=f+hgGuF83qj+CVYq0Bp5teX53gO/bQQXeAnlpVCIPXw=;
 b=gVah02tJwhDjQL+eYUVvyurIGcX8pZ4B9ZPudLSc2p5Y4XP7kAyK7VtL037Yg34HfB
 htdxly07uRZhTGMpDm8BO8bAHyssKVtA32sf0pkQNBw03j1n9SGpJpbItAThXbHwgZpZ
 E7wlP+tHtPCh5m6rJoPxE6/fQlumJJJzWO8mtcConDiyBgipLAasVYuKvcxkttsPRl3W
 zk0BLVj69SwjwURX56cr8gpchGGUHDpL+6/XsDrK45suDz1OOqRb3Uky/5QH7omXfP5u
 O0xF6+0r3g/gcQnRmPcuOw5QG4oZt7q7hqsrj8ukLUty5dnXt+g6WoShF+VTI4tc2vQ5
 v4bQ==
X-Gm-Message-State: AOJu0YwP8ukUZpz5r8+v/Hh6FaPbiJG9+otnXQey+cm6Si7lrHKTrcxj
 P+oVsTnt0YhIGTqPuIjAhwGudZYZnSWsOhhA5MX5RDUZZRXMVgeQFQyz1sPn3/aUXZc2tBD0aCt
 IqS3EzvfrDtyYQz04C6Qp+2VMaZLvv4ofWqZLVBIv
X-Gm-Gg: AR+sD13y1mdKfmM1Dzf0SpgJWb1gM3Io3RF+GDfzPoPoSJYwKEGgCZxmVitcCEn+Mo5
 NMDQG3cPaA/zz47vt3KdD7NhhZsUwPbM7QPvT5kFji24RXq5hTkOEmsxBIFXxLlpV1Vjd6ZF1Hm
 R58+iUovgoDgtuGINN9fuxEgDFiaFGarjAt8Y+LehmhR28i7jUOYSS14Nc26vt1Bl9xNEZ7DHRo
 4hKDlv7nWeZxQzyZscuS1XJsp1z3geWPvkpuqpzczgueq+LRQlGSuNFuBjcKoBmnmnlkCC4dN/Y
 h19CVa+md/N8vc3Vt7Tjeq5Z9Xq8jpTWn8/9LvcMG8tu4kVRS8RFPrUcntr/CCLUtpRi+krXrLe
 pUw==
X-Received: by 2002:ac2:4466:0:b0:5ae:b7d4:7ddb with SMTP id
 2adb3069b0e04-5b2e4f34243mr2017681e87.26.1785852282202; Tue, 04 Aug 2026
 07:04:42 -0700 (PDT)
MIME-Version: 1.0
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN>
 <CAH_c0bc9M=H8Os=D0DGJ12P0dqKDE+TQtwS9yMw+obqJR8ON-A@HIDDEN>
 <86bjblexxq.fsf@HIDDEN>
In-Reply-To: <86bjblexxq.fsf@HIDDEN>
From: Aaron Iba <ai@HIDDEN>
Date: Tue, 4 Aug 2026 10:04:29 -0400
X-Gm-Features: AUfX_mzJDrFcblOXPAhmVh_j22gziNyjjmGYoXb57G7Ve8W7EDf9qVhF2uGY_B4
Message-ID: <CAH_c0bfH+S8ama3zf+Jbqe1W8DboPzqF-8Q=uV9cQ4VtLdEh0Q@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Sorry, I don't understand: where do you see code that frees the matrix
> and then allocates it, without changing the value of
> window_desired_matrix?

My earlier message was imprecise, sorry.  The old matrix never goes
through adjust_glyph_matrix on this path: Fdelete_other_windows_internal
calls free_window_matrices (r) on the frame's old root, which frees
both matrices of every leaf window under it -- including WINDOW, the
window being kept -- and sets them to NULL; then
allocate_matrices_for_window_redisplay creates brand-new structs, and
only those reach adjust_glyph_matrix.  So window_desired_matrix holds a
freed address by the time your comparison runs, and it matches only
when malloc happens to reuse that address (which is what distinguished
my runs where the guard fired from the runs that crashed, and I suspect
also why it worked on your machine).  This is also why free_glyph_matrix
does run on live frames: via free_window_matrices from
delete-other-windows, delete-window, and set-window-configuration.
Comparing it->w->desired_matrix against the captured pointer after the
fontification call returns closes the gap; with that one check added to
your patch, the recipe went 8 for 8 without a crash here (about half
crashed before).

That said, I readily concede this may not be worth more of your time or
more complexity in the codebase: hitting it requires Lisp that changes
the window configuration from inside redisplay, which took an unlikely
conspiracy of three packages in my case and is already fixed at the
Lisp level (perspective.el PR #233, merged).  For posterity I've put
the full details -- annotated control flow, the instrumented traces,
the tested add-on patch, and both -Q recipes -- in one place:
https://gist.github.com/aiba/4f15747785697af18ed3ee297b61744f
Nothing here needs a reply; happy to test if you take it further, and
equally content if you decide the current patch is protection enough.
Thanks for all your work on this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 2 Aug 2026 08:20:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 04:20:14 2026
Received: from localhost ([127.0.0.1]:39281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqRQb-0005Ns-Hw
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 04:20:14 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37490)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wqRQZ-0005NT-DL
 for 81407 <at> debbugs.gnu.org; Sun, 02 Aug 2026 04:20:12 -0400
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 <eliz@HIDDEN>)
 id 1wqRQS-0003gU-LO; Sun, 02 Aug 2026 04:20:05 -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=JHnn1AZWXWtI0Bz5cxc255klEHpMyasuNbHk1c38E7c=; b=iqoR8c+kvgDN
 KRpzP32l1Y4E6UqfAINaUzbjzQbIRXgT/KT9TybLdH8uFONss6qyyiDKWREZVC9QHKggU6xl+plW9
 aZIGNCs/kf7vWGj5vjAiXUwE0jXs/2v4YAb4AJBMXmpUN/EFCzm9M2unFWzA4JRHaNzfDAXQvzlHs
 rkC1UJcvbE0rQSUd4s/B4y47E+DfNWyK5wQxORliAMvEYKwZe5GtVnbbN6mGXL9SuyX7OcevjYsEQ
 FAtrIi1LpfCa5nfn5VAHcr+afcXf7cD022sjPDsIWTjYia2gPAbsI9g5sPA5fnDr7J017iS3kpnTz
 1BqaEou/4NOpeo3kK5iDDA==;
Date: Sun, 02 Aug 2026 11:20:01 +0300
Message-Id: <86bjblexxq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Aaron Iba <ai@HIDDEN>
In-Reply-To: <CAH_c0bc9M=H8Os=D0DGJ12P0dqKDE+TQtwS9yMw+obqJR8ON-A@HIDDEN>
 (message from Aaron Iba on Mon, 27 Jul 2026 09:14:54 -0400)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN>
 <CAH_c0bc9M=H8Os=D0DGJ12P0dqKDE+TQtwS9yMw+obqJR8ON-A@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Aaron Iba <ai@HIDDEN>
> Date: Mon, 27 Jul 2026 09:14:54 -0400
> Cc: 81407 <at> debbugs.gnu.org
> 
> > Try the patch below, it seems to avoid the trouble here.
> 
> Thanks!  I applied it to the emacs-31 branch (builds as 31.0.91 now)
> and tested on macOS/NS, arm64, --without-native-compilation.  Results:
> the patch helps but the guard is unreliable here -- I still get the
> crash in a fair fraction of runs, and I found out why.
> 
> Test results with the -Q recipe (5 plain runs + 3 instrumented runs):
> 
>   - guard fires, evil Lisp aborted, no crash:  ~1/4 of runs
>     ("Error during redisplay: (my-evil-fontify 1157) signaled (error
>      \"fontification-functions cause glyph matrix reallocation;
>      disabled\")" appears in *Messages*, Emacs is fine afterwards)
>   - guard does NOT fire, no crash (freed block still readable): ~1/4
>   - guard does NOT fire, SIGSEGV as before: ~1/2
> 
> Why the guard misses: on this code path the window's matrices are not
> adjusted in place -- they are freed and new matrix structs are
> allocated.  I put a logging breakpoint on adjust_glyph_matrix in the
> patched build, printing MATRIX, its rows/rows_allocated on entry, and
> the current value of window_desired_matrix.  After the evil
> delete-other-windows, every adjust_glyph_matrix call comes in with a
> fresh struct (rows == NULL, rows_allocated == 0):
> 
>   run where the guard MISSED and Emacs crashed:
>     [adjust] matrix=0x80e1fc4d0 rows=0x0 alloc=0
> window_desired_matrix=0x80efa2e60 MATCH=False
>     [adjust] matrix=0x80e1fc540 rows=0x0 alloc=0
> window_desired_matrix=0x80efa2e60 MATCH=False
>     [adjust] matrix=0x80e1fc7e0 rows=0x0 alloc=0
> window_desired_matrix=0x80efa2e60 MATCH=False
>     [adjust] matrix=0x80e1fc850 rows=0x0 alloc=0
> window_desired_matrix=0x80efa2e60 MATCH=False
>     ... none of the new structs equals the old desired matrix; the old
>     struct (0x80efa2e60) was freed; display_line crashes afterwards at
>     xdisp.c:26855 (it->current_y += row->height) reading the freed row.
> 
>   run where the guard FIRED:
>     [adjust] matrix=0xbd8faf870 rows=0x0 alloc=0
> window_desired_matrix=0xbd8faf870 MATCH=True
>     ... note rows == NULL and rows_allocated == 0: this is also a
>     brand-new struct -- malloc just happened to reuse the freed old
>     struct's address, so the pointer comparison matched by accident.

Sorry, I don't understand: where do you see code that frees the matrix
and then allocates it, without changing the value of
window_desired_matrix?  The patch adds the detection of reallocation
in every case where adjust_glyph_matrix is about to call any
memory-allocation function to modify matrix->rows or row->glyphs of
some matrix rows.  Which parts of adjust_glyph_matrix that reallocate
the glyph rows are not covered?

> So `matrix == window_desired_matrix' compares against a pointer that
> is dangling by the time the comparison runs; whether it matches is
> heap-layout luck.  (I suspect the same was true when it "avoided the
> trouble" on your machine.)

Please explain how come window_desired_matrix becomes a dangling
pointer, because I'm afraid I don't understand that.  Specifically,
please describe the flow of control which causes window_desired_matrix
no longer point to the window's desired matrix manipulated by
adjust_glyph_matrix.

> This also means the crashing scenario is slightly different from what
> the patch assumes: the desired matrix is not enlarged behind
> redisplay's back -- it is destroyed and replaced.

Where in the code does this happen, please?

> Perhaps the check
> belongs where matrices are freed or detached from the window rather
> than (only) in adjust_glyph_matrix: e.g. remember the window (or
> compare w->desired_matrix against the matrix captured at
> handle_fontified_prop time after the fontification call returns), or
> error in free_glyph_matrix when it is called on window_desired_matrix.

free_glyph_matrix is only called when a frame is deleted.  Do you have
a recipe where it is called for a live frame?

> Two smaller observations, in case they matter:
> 
>   - disable_fontification_functions_p is never reset, so one offense
>     permanently disables fontification in that buffer (until it is
>     killed).  Maybe intended as punishment, but a buffer whose hook
>     misbehaved once (e.g. transiently, via some state in another
>     library) stays unfontified with no way back that I can see short
>     of killing it.

That's intentional: such buffer's fontification-functions cannot be
trusted, so they are effectively disabled.  Why should we trust the
hook to misbehave just once?

> One more scope finding: fontification-functions is not the only
> Lisp-during-window-redisplay entry point that can do this.  The same
> evil call fired from a mode-line :eval form also crashes the patched
> build (SIGSEGV inside display_mode_line <- display_mode_lines), and
> window_desired_matrix is not set around mode-line evaluation, so the
> new guard cannot see it at all:
> 
> ;;; repro-modeline.el --- emacs -Q -l repro-modeline.el

This doesn't crash for me.  Emacs just exits when it reaches
kill-emacs.  And if I comment out kill-emacs, I get a working Emacs
session.

Anyway, there's a limit to which I'm prepared to safeguard Emacs
against crazy Lisp hooks.  If they want deliberately to crash Emacs,
let them crash.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.
Added indication that bug 81407 blocks81521 Request was from Sean Whitton <spwhitton@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 27 Jul 2026 13:15:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 27 09:15:19 2026
Received: from localhost ([127.0.0.1]:37563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1woLAs-0001LR-GV
	for submit <at> debbugs.gnu.org; Mon, 27 Jul 2026 09:15:19 -0400
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:46326)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ai@HIDDEN>) id 1woLAp-0001K2-C5
 for 81407 <at> debbugs.gnu.org; Mon, 27 Jul 2026 09:15:16 -0400
Received: by mail-lj1-x22f.google.com with SMTP id
 38308e7fff4ca-39c8e65e3f5so21804541fa.0
 for <81407 <at> debbugs.gnu.org>; Mon, 27 Jul 2026 06:15:15 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1785158109; cv=none;
 d=google.com; s=arc-20260327;
 b=QK2Cp6zxMn8yN35Dm8pyey/0kKFRySmkXKoenR7irFsC3fSp4VRsnooxBJAofwWpta
 0l9Y2eFZZzEILVOyONPvVcYY+rYnQSwmzXmy+9NC48ZazxaPARjFjA6cYeWpUAWDT962
 zKRJxUErpxu7G0VjcqX/oULrIhKvnnAFK4lLi4Rw0TuDCSMHPsVVMStU7TR51A3O2m0r
 X8O/zrSCeY6pxYrSZwO/kQZKXgyY+I47RagVnWNNTHbSiY0kc4F9Id3nQFuhtQtDxJhc
 XgBKOl9LxeWSyoZ6PuJjQ1Iu4lQIFiOSPO0Oy0pAwjyfSLSlDbOaRLahaaG9FpmX+mi1
 KjTA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20260327; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:dkim-signature;
 bh=Si4p4OerXEcslYoalC+bIMw7AMCLLTY7vh/9mm8Z1TE=;
 fh=E1mpT6rvccdR4r/KFkbsjcsUW8fJe6FkaoIi2mehYwI=;
 b=swN4dljnh9uBW/1wcQy6P1vQpdE6YYTiJVFs0eyWOSG6HjEfWM4q0Zp5b8ybsPhoMl
 SyBNRs/HsmwTICcwMJJ25yYYG9s50eS9uXOrLlcDM44yRrqgSJsfvv/mLLWk3GRohmJm
 tTCk9XHXz2e568pt8KnKzrws6y9FAvrMpQMU1+Si7RbBqX62ZM/5X7rr6ZNOV9PeJeMj
 hS4JP/x6b0wBQRolJCgpC6qVYunSkUTVQ895lxASCAbEwJyWKs39jNa6OkUSVsphNZVT
 DkLlWQyv1RdGmm5yKnDwBSM90hj7JCoSpDazPUZ7cAhpmfSdtDyplDSnqKZGkqAtfXrD
 vSyA==; darn=debbugs.gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=aaroniba.net; s=google; t=1785158109; x=1785762909; darn=debbugs.gnu.org;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=Si4p4OerXEcslYoalC+bIMw7AMCLLTY7vh/9mm8Z1TE=;
 b=qAOuvTYLjqLhs/dYM3bKkZSHwtRLN88TxjiVrEaJMXSbQhNklGLeruGPfD0UBOcLDB
 eM9mh5ryKMh06+7cjgO2BWD/scgByyU2dF+YSjQpJLMfbF6JCb2n7OowISNwnaFMrRIv
 Umb3qbyOplNy+EKFd+AnV0tLS2JjvoN30Lr+dWeZPKDnWf7ZqJbvgg5Bo8/BWaU7x6YP
 sPQ8nBZtlNyYB9rN3C5F/u5Ye5xt12fwIWQltk7DJk1qcWNZlwvR8Mpe2aqT+l8xVEJQ
 P7FnJ0RDMhMEnoDooBTHDBw8il07M0hhZTTdppOVs4UEuQvDxfRGXM15ntO2Z7glEYXU
 ZAJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1785158109; x=1785762909;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to:content-type;
 bh=Si4p4OerXEcslYoalC+bIMw7AMCLLTY7vh/9mm8Z1TE=;
 b=DrMksNj6PZpw/hzZb+Va5vfAXzCYzNXWbwjyHPeyRmQTVmNeRm4PLg6Xc/DpTSj6Oy
 W5lLd4alZrzuccOETkt2UKv3OHVG0mt1sBQbEE3CcpaJNiKb4YqDFz/d6CT9Pres+i0n
 ylsOS+vm4iO83pLo5lqp72BKYSmJciJoTLYBzt9Sa42+cvn3nDQSBp7nCUoUKAxfK6zA
 RNKTLsnkuiXD5KUUM1ArjXnTcyRR8g74x6kng+/A9Jb3tZUB6GEr4qCHa6j7ml/xSsbi
 FzFgx/uBEdC1gA2O/UOjnlJbI9DjwXEhKgjoTEW8ZZ/u9b2xCLUVz/Zv7LtIu47Qz3lH
 TPiQ==
X-Gm-Message-State: AOJu0YxXMmGxCGSVdPvk6VCw8l9c0+6zq1mskeCT+xhyip/99b0EOr02
 YPhiz9eCRkyAK68JXGmgTd4Z64Ggt9OfOffSVlP/yglTUc7kHa/v0zmFLQkZiiwsHGgUxpgDZiR
 xNS46maBP/RfIVKyQFnUoHfBYOyAoHTlaFQQ24BIc
X-Gm-Gg: AR+sD11MKHjag9S4K6ar9VP5g4bh01q0rzTjsT6IqocxrxyVI7VB0eB8OGl6AlIyImL
 lBq7vCd7XMfWB/D0KdCFlijQJhWLlR2P716yXsQWIlVNbtMD5ilV0hHUBchI3FVETRljhhHnilQ
 yHnMZ7ye8AIlidxrgRn1vBUvwKd0iia0T76SPlsG/+VGoj7IiA5+/0qzwpoopRtayRNyHVajogF
 XWiocPzSSveT0vhXpa/7dfI24uvjDdeqE78ApAImX5QTXo4kBp0UaqcZffZHXzynfieleTEZtc0
 Lz3ACoXUaXWruf5qcpd5MzCONlo9
X-Received: by 2002:a05:6512:68b:b0:5b2:a1f2:465c with SMTP id
 2adb3069b0e04-5b2c1b16206mr1962928e87.29.1785158108537; Mon, 27 Jul 2026
 06:15:08 -0700 (PDT)
MIME-Version: 1.0
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 <86y0fb1c7m.fsf@HIDDEN>
In-Reply-To: <86y0fb1c7m.fsf@HIDDEN>
From: Aaron Iba <ai@HIDDEN>
Date: Mon, 27 Jul 2026 09:14:54 -0400
X-Gm-Features: AUfX_mwJVueD7Xyu7-BNYBEmHYyfEDzl02dIymlZ5oY70iptuoBs5YBAW593roc
Message-ID: <CAH_c0bc9M=H8Os=D0DGJ12P0dqKDE+TQtwS9yMw+obqJR8ON-A@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Try the patch below, it seems to avoid the trouble here.

Thanks!  I applied it to the emacs-31 branch (builds as 31.0.91 now)
and tested on macOS/NS, arm64, --without-native-compilation.  Results:
the patch helps but the guard is unreliable here -- I still get the
crash in a fair fraction of runs, and I found out why.

Test results with the -Q recipe (5 plain runs + 3 instrumented runs):

  - guard fires, evil Lisp aborted, no crash:  ~1/4 of runs
    ("Error during redisplay: (my-evil-fontify 1157) signaled (error
     \"fontification-functions cause glyph matrix reallocation;
     disabled\")" appears in *Messages*, Emacs is fine afterwards)
  - guard does NOT fire, no crash (freed block still readable): ~1/4
  - guard does NOT fire, SIGSEGV as before: ~1/2

Why the guard misses: on this code path the window's matrices are not
adjusted in place -- they are freed and new matrix structs are
allocated.  I put a logging breakpoint on adjust_glyph_matrix in the
patched build, printing MATRIX, its rows/rows_allocated on entry, and
the current value of window_desired_matrix.  After the evil
delete-other-windows, every adjust_glyph_matrix call comes in with a
fresh struct (rows == NULL, rows_allocated == 0):

  run where the guard MISSED and Emacs crashed:
    [adjust] matrix=0x80e1fc4d0 rows=0x0 alloc=0
window_desired_matrix=0x80efa2e60 MATCH=False
    [adjust] matrix=0x80e1fc540 rows=0x0 alloc=0
window_desired_matrix=0x80efa2e60 MATCH=False
    [adjust] matrix=0x80e1fc7e0 rows=0x0 alloc=0
window_desired_matrix=0x80efa2e60 MATCH=False
    [adjust] matrix=0x80e1fc850 rows=0x0 alloc=0
window_desired_matrix=0x80efa2e60 MATCH=False
    ... none of the new structs equals the old desired matrix; the old
    struct (0x80efa2e60) was freed; display_line crashes afterwards at
    xdisp.c:26855 (it->current_y += row->height) reading the freed row.

  run where the guard FIRED:
    [adjust] matrix=0xbd8faf870 rows=0x0 alloc=0
window_desired_matrix=0xbd8faf870 MATCH=True
    ... note rows == NULL and rows_allocated == 0: this is also a
    brand-new struct -- malloc just happened to reuse the freed old
    struct's address, so the pointer comparison matched by accident.

So `matrix == window_desired_matrix' compares against a pointer that
is dangling by the time the comparison runs; whether it matches is
heap-layout luck.  (I suspect the same was true when it "avoided the
trouble" on your machine.)

This also means the crashing scenario is slightly different from what
the patch assumes: the desired matrix is not enlarged behind
redisplay's back -- it is destroyed and replaced.  Perhaps the check
belongs where matrices are freed or detached from the window rather
than (only) in adjust_glyph_matrix: e.g. remember the window (or
compare w->desired_matrix against the matrix captured at
handle_fontified_prop time after the fontification call returns), or
error in free_glyph_matrix when it is called on window_desired_matrix.
The post-fontification check in handle_fontified_prop could then
detect "w->desired_matrix != saved pointer" and abort the window's
redisplay the way your patch already does.

Two smaller observations, in case they matter:

  - disable_fontification_functions_p is never reset, so one offense
    permanently disables fontification in that buffer (until it is
    killed).  Maybe intended as punishment, but a buffer whose hook
    misbehaved once (e.g. transiently, via some state in another
    library) stays unfontified with no way back that I can see short
    of killing it.

  - The crash backtrace in the guard-miss case is the same as in my
    original report: try_window (xdisp.c:21693) -> display_line
    reading the stale ROW right after the fontification call returns.

One more scope finding: fontification-functions is not the only
Lisp-during-window-redisplay entry point that can do this.  The same
evil call fired from a mode-line :eval form also crashes the patched
build (SIGSEGV inside display_mode_line <- display_mode_lines), and
window_desired_matrix is not set around mode-line evaluation, so the
new guard cannot see it at all:

;;; repro-modeline.el --- emacs -Q -l repro-modeline.el
(defvar my-armed nil)
(setq-default
 mode-line-format
 (list "%b "
       '(:eval (progn
                 (when my-armed
                   (setq my-armed nil)
                   (delete-other-windows))
                 ""))))
(defun my-go ()
  (switch-to-buffer (get-buffer-create "*top*"))
  (split-window-below)
  (select-window (next-window))        ; select bottom window
  (switch-to-buffer (get-buffer-create "*bottom*"))
  (run-at-time 0.5 nil (lambda ()
                         (setq my-armed t)
                         (force-mode-line-update t)
                         (redisplay t)
                         (kill-emacs 0))))
(add-hook 'window-setup-hook #'my-go)
;;; end

Here the top window's mode line is being displayed when the :eval form
deletes that very window, so the mode-line display continues with
freed matrices.  I mention it because a fix scoped to
fontification-functions would still leave this (and presumably
header-line/tab-line eval, window-scroll-functions, etc.) exposed;
whatever invariant the fix enforces probably wants to hold for any
Lisp called from inside the window-redisplay loop.

Happy to run further instrumented tests or try a revised patch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 16 Jul 2026 10:05:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 16 06:05:52 2026
Received: from localhost ([127.0.0.1]:56320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wkIyV-0006dF-AG
	for submit <at> debbugs.gnu.org; Thu, 16 Jul 2026 06:05:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35460)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wkIyS-0006cy-Si
 for 81407 <at> debbugs.gnu.org; Thu, 16 Jul 2026 06:05:49 -0400
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 <eliz@HIDDEN>)
 id 1wkIyN-0003cj-Bd; Thu, 16 Jul 2026 06:05:43 -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=4102N61cYf2XbtdbKjPVTz0kL8qGNS/Gvush/fBoSvE=; b=nw3qf4lZpNW/
 +qCNLeQNPJJlDLcuu7U8S4NQEl1FVaRRs50/6S8ICrCoOHR+IRgrg5XTITSaO2PDrX++7q1xb0vOy
 x0EIArjlvJfy4InTdX9d6m6+KHsHR5wiwNczju9GCZc7hyOQtWan3GdHO1RvThnEvlTQKHAJzTexK
 8C/a3A8k/KNxx1OoWaZbvAcsqPfXD1yfouz/E7KlFchA9Z3lrqM2MuTv3Pu1oY6cH2OiH2OMryCKp
 WJrtHmQGqLF+xLzAMq28HAiSLXwgxkgczSl0naPGsUY7OUDOtIuZhper/w0l2njX1uWA5QEnIWJKg
 6BIl6EDHOE+sKVCg0mLs6Q==;
Date: Thu, 16 Jul 2026 13:05:33 +0300
Message-Id: <86y0fb1c7m.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Aaron Iba <ai@HIDDEN>
In-Reply-To: <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
 (message from Aaron Iba on Wed, 15 Jul 2026 09:23:56 -0400)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
 <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Aaron Iba <ai@HIDDEN>
> Date: Wed, 15 Jul 2026 09:23:56 -0400
> Cc: 81407 <at> debbugs.gnu.org
> 
> > We need something smarter, and perhaps more radical.  Let me think
> > about this.
> 
> Understood, and agreed on the infloop risk: in the recipe the second
> pass happens to stabilize only because the rows array moves just when
> the window exceeds its historical maximum height, so a retry
> succeeds; Lisp that alternates between two window configurations
> would defeat any plain retry scheme.  Happy to test whatever you
> settle on -- I can reproduce at will, both with the -Q recipe and
> with the original configuration.

Try the patch below, it seems to avoid the trouble here.

diff --git a/src/buffer.h b/src/buffer.h
index 986cc6f..208fac3 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -715,6 +715,8 @@ #define BVAR(buf, field) ((buf)->field ## _)
      display optimizations must be used.  */
   bool_bf long_line_optimizations_p : 1;
 
+  bool_bf disable_fontification_functions_p : 1;
+
   /* The interval tree containing this buffer's overlays. */
   struct itree_tree *overlays;
 
diff --git a/src/dispextern.h b/src/dispextern.h
index 357504d..6da86cb 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1153,6 +1153,9 @@ #define CHECK_MATRIX(MATRIX) ((void) 0)
 #endif
 };
 
+/* The desired_matrix used by redisplay_window, to allow detection of
+   reallocation behind its back.  */
+extern struct glyph_matrix *window_desired_matrix;
 
 /* Get a pointer to row number ROW in matrix MATRIX.  If GLYPH_DEBUG
    is defined, the function matrix_row checks that we don't try to
diff --git a/src/dispnew.c b/src/dispnew.c
index dd799c6..be936ac 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -413,6 +413,15 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
   /* Enlarge MATRIX->rows if necessary.  New rows are cleared.  */
   if (matrix->rows_allocated < dim.height)
     {
+      /* Don't allow reallocation of the desired matrix while it is
+         being used by redisplay_window and its subroutines.  */
+      if (matrix == window_desired_matrix)
+	{
+	  eassert (BUFFERP (w->contents));
+	  XBUFFER (w->contents)->disable_fontification_functions_p = 1;
+	  error ("fontification-functions cause glyph matrix reallocation; disabled");
+	}
+
       int old_alloc = matrix->rows_allocated;
       new_rows = dim.height - matrix->rows_allocated;
       matrix->rows = xpalloc (matrix->rows, &matrix->rows_allocated,
@@ -495,6 +504,15 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
 	  || header_line_changed_p
 	  || marginal_areas_changed_p)
 	{
+	  /* Don't allow reallocation of the desired matrix while it is
+             being used by redisplay_window and its subroutines.  */
+	  if (matrix == window_desired_matrix)
+	    {
+	      eassert (BUFFERP (w->contents));
+	      XBUFFER (w->contents)->disable_fontification_functions_p = 1;
+	      error ("fontification-functions cause glyph matrix reallocation; disabled");
+	    }
+
 	  struct glyph_row *row = matrix->rows;
 	  struct glyph_row *end = row + matrix->rows_allocated;
 
diff --git a/src/window.c b/src/window.c
index 78a5a44..97766c6 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3709,11 +3709,11 @@ DEFUN ("delete-other-windows-internal", Fdelete_other_windows_internal,
 	}
     }
 
+  FRAME_WINDOW_CHANGE (f) = true;
+
   adjust_frame_glyphs (f);
   unblock_input ();
 
-  FRAME_WINDOW_CHANGE (f) = true;
-
   return Qnil;
 }
 
diff --git a/src/xdisp.c b/src/xdisp.c
index caea8e7..81ac6dc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -822,6 +822,11 @@ #define MAX_SCRATCH_GLYPHS 100
 
 bool help_echo_showing_p;
 
+/* The desired_matrix used by redisplay_window, to allow detection of
+   reallocation behind its back.  */
+
+struct glyph_matrix *window_desired_matrix;
+
 /* The maximum distance to look ahead for text properties.  Values
    that are too small let us call compute_char_face and similar
    functions too often which is expensive.  Values that are too large
@@ -4669,7 +4674,8 @@ handle_fontified_prop (struct it *it)
   Lisp_Object prop, pos;
   enum prop_handled handled = HANDLED_NORMALLY;
 
-  if (!NILP (Vmemory_full))
+  if (!NILP (Vmemory_full)
+      || current_buffer->disable_fontification_functions_p)
     return handled;
 
   /* Get the value of the `fontified' property at IT's current buffer
@@ -4719,6 +4725,11 @@ handle_fontified_prop (struct it *it)
 	 clear our face and image caches behind our back.  */
       it->f->inhibit_clear_image_cache = true;
 
+      /* Allow detection of reallocation of the desired glyph matrix due
+         to Lisp code in 'fontification-functions'.  */
+      struct glyph_matrix *saved_matrix = window_desired_matrix;
+      window_desired_matrix = it->w->desired_matrix;
+
       if (!CONSP (val) || EQ (XCAR (val), Qlambda))
 	dsafe_call1 (val, pos);
       else
@@ -4752,6 +4763,7 @@ handle_fontified_prop (struct it *it)
 	    }
 	}
 
+      window_desired_matrix = saved_matrix;
       it->f->inhibit_clear_image_cache = saved_inhibit_flag;
       unbind_to (count, Qnil);
 
@@ -4779,6 +4791,14 @@ handle_fontified_prop (struct it *it)
 	 into face properties (bug#7876).  */
       it->end_charpos = ZV;
 
+      if (current_buffer->disable_fontification_functions_p)
+	{
+	  if (it->w->desired_matrix)
+	    it->w->desired_matrix->no_scrolling_p = true;
+	  it->f->fonts_changed = true;
+	  error ("misbehaving fontification, redisplay of window aborted");
+	}
+
       /* Return HANDLED_RECOMPUTE_PROPS only if function fontified
 	 something.  This avoids an endless loop if they failed to
 	 fontify the text for which reason ever.  */




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 15 Jul 2026 13:24:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 09:24:23 2026
Received: from localhost ([127.0.0.1]:48986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjzb2-0006td-VB
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2026 09:24:23 -0400
Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:55580)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ai@HIDDEN>) id 1wjzay-0006rb-14
 for 81407 <at> debbugs.gnu.org; Wed, 15 Jul 2026 09:24:18 -0400
Received: by mail-lf1-x132.google.com with SMTP id
 2adb3069b0e04-5b021916bd3so4517105e87.3
 for <81407 <at> debbugs.gnu.org>; Wed, 15 Jul 2026 06:24:15 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1784121849; cv=none;
 d=google.com; s=arc-20260327;
 b=dVj8IdJtOS/0a9qufgXHWqJQAx6Ri6DFJ8Kr16ASlf7WzAP+u9dzjrB83nFXXgm5tz
 NIqjVt8ic/r/dK090UKgMgEJqurVS/H1lcgqfJ+Cj0v1O+17r114NL7djaTqazBUo5Kf
 GML33rCnqoPMP+BrByAKEnNbr4z1KildmhWxKsxIPGwaryX9MIfwSkAi9J5eqnxxZkjv
 NjMEIHbjGMR20Ndf3HeNqe10VJi/5qZK9EeBeolbGgsiq8QdDY0ZwCMockO/9w/dFm6v
 +de5Nv9fUQIk4/JQSu1eXofR+Ng/4rnlgb/sYEBHs8pEzqRfq/iCnlNamoruibMRUYiE
 dgzw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20260327; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:dkim-signature;
 bh=DRuG34QPbdmHjAOHae5R6z1a1GOWrYriPS1YdHxPYv0=;
 fh=E1mpT6rvccdR4r/KFkbsjcsUW8fJe6FkaoIi2mehYwI=;
 b=kBdtxSIBeYs38ZdIysHVUkHIpHC7pJEoVbHC3DJ0fPbAGYpoqFbgKRjsbgEnKJnmh4
 +fTII+fbXx17z1HJyMb0Y82KsOhY+0Qg/wXjm/09hv5nuKFARL1JWpjBifv1dYxma9ZC
 tDQyEKDUI2DyT7RZ2ERXn4DLOaaeEESQir9c+zexwWyPNdxQYD4pg+262HKpbk7W7s22
 kpHIHEfptIlV07o/CndGN9mQw4xplB4UXOlAaTokx0GfCQYCEuUlaHz1tfKKzX9Dft8Z
 F2U1B9UnWRuEkS5l85N+Ka8As97y1zAv0nvg0L9ohAXl0cC+UO2tbl/dMEBuTF75+i8x
 YbQg==; darn=debbugs.gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=aaroniba.net; s=google; t=1784121849; x=1784726649; darn=debbugs.gnu.org;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=DRuG34QPbdmHjAOHae5R6z1a1GOWrYriPS1YdHxPYv0=;
 b=BVUt6Kf/tRg+pch/98bK3yNS1bYMHmoa5lcCMfI+CKNRJ0NhzKOlhgZ56GDPdvhWpl
 0vew7gCasSj04Qy6qEIDVpreoS7DGc5DNQWTple9etRQ7VcxhjBllxT3C0HoMyHtYZNO
 wJSauUo5VJo4oMnZPyzysyPhSINZVRRjG83ot3VxeO5z5P67xelDudv/QtiKtTZoAUy8
 KWvHKLDf63muM/nKRER0GmGvCONUcbfd1UB1sDc9T9paBmTpwk/yk5IK2O8CvOS0HvJ/
 oyEjNlWrgd3O/BErnqeVoYO3DelIf1G2UqFXcTWhiNUkUgjEpwNcvJm5k1ufugO8NA3e
 cA5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1784121849; x=1784726649;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to:content-type;
 bh=DRuG34QPbdmHjAOHae5R6z1a1GOWrYriPS1YdHxPYv0=;
 b=aaEVknfyEX55mAfK1NuC6HGhPz6jSBuZOl2LLS8do+YU5NIT3zdmRWhWMG7XrAC6El
 2My5EE7fG2JaRMC0VYzWUGbzdRHirzNlc+KR3KP4hQXssX9Z3N5ymq+/Y/WN/cWsFe0b
 ZrlLIAGYTSppILxnVL4uEbZuvphLDOOYmgoi9XMSYa9TZgLpF+GFl6yfZq+aWK9mnBwm
 WJ+hPAvZ82eJG9J0E6FMyjyX/LzY2DjTV6ml/fdG4qkmK1l9/ywkM6HvbU3P6wdqvem6
 Uv0wIbgZ5llicFu1C4cmlVR2rk+KECF4gBzGXlbt1VcCiWTGVffwoi6Nu7ijeUD/4gKe
 kY7g==
X-Gm-Message-State: AOJu0Yzi+S4IHtyd2IxfqjFnP1uoQAAKABYQmRMMVN7pzc+aOcQ1CwyS
 6NDZ+Yn+lhUaue3Hynmc/omNmEMibjalFoLTBMBbYltca6m05KkiLRlBpEvYkkfHef+rG4rouqi
 /h/Mw7CM5HTeVyGoobJTw03Oc3cD12YWK4beAsEKqlYPrMEFtqu0ysA==
X-Gm-Gg: AfdE7cmE3h+rcumW7uYyhm6CXlmggtqJejJuzcZVHLvCnc7I8KHtt8XrjHeSdhYnitb
 HXCR5ty4bCNDW552V2BxM2u8GrodDndTKFW3+riNZQYl7nuYVzwDR5tkATYVgrn5Gs63QV4ehXg
 sX00LUOdNTHuAVbDRjTcvSO3NBmRhsu0qfB1dEPOOVWf7PdPXhFErvw1oNsIIPtbC/hNmu9Talk
 pXBUpV7pixkJJXrMbQhqDUU1ksNlJy2iNazLXYriQF7goF6FYsDb2R9+Sl6yOyWPZJDVMeCNjTR
 gDkOrrZTDK8eLSaUdzFRF1VmA979
X-Received: by 2002:a05:6512:66da:b0:5b0:1f61:f5e with SMTP id
 2adb3069b0e04-5b15d79d300mr445069e87.33.1784121849209; Wed, 15 Jul 2026
 06:24:09 -0700 (PDT)
MIME-Version: 1.0
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 <86ldbc2z6e.fsf@HIDDEN>
In-Reply-To: <86ldbc2z6e.fsf@HIDDEN>
From: Aaron Iba <ai@HIDDEN>
Date: Wed, 15 Jul 2026 09:23:56 -0400
X-Gm-Features: AUfX_mw9-9QTAByy8-pNYGee58_7L-ew3AFoVxD4J-Pq41hor4qLH8emoZOAVmc
Message-ID: <CAH_c0bdSVwQezySQFm3QxRgAU9dY455b-+wMSq8MXRXq6eNoxQ@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Is that what the original code you found in your real-life use case
> does -- calls delete-other-windows from a function in
> fontification-functions?  If not, what does it do, exactly?

No.  In the real-life case nothing looks like it touches windows at
all -- the delete-other-windows is buried two libraries down inside
what its callers use as a pure predicate.  The exact chain, captured
with a breakpoint on adjust_frame_glyphs (Lisp frames are
native-compiled .eln in this session):

  adjust_glyph_matrix
  allocate_matrices_for_window_redisplay
  adjust_frame_glyphs
  Fdelete_other_windows_internal
  delete-other-windows                 ; window.el
  persp-reset-windows                  ; perspective.el
  persp-activate                       ;   (persp-switch restores a
  persp-switch                         ;    saved window configuration)
  persp-current-buffers*               ; perspective.el
  persp-is-current-buffer              ; perspective.el
  ...seq-filter over session list...   ; my configuration (advice)
  sesman-current-session               ; sesman.el
  cider-repls                          ; CIDER
  cider-current-repl
  cider-connected-p                    ; CIDER's menu-bar :enable form
  eval_sub / internal_condition_case_1
  menu_item_eval_property
  parse_menu_item
  menu_bar_item / map_keymap / menu_bar_items
  update_menu_bar
  redisplay_internal

What happens is: CIDER's menu has items with :enable forms like
(cider-connected-p).  Evaluating that consults sesman for the current
session; an advice in my configuration filters the session list by
perspective using perspective.el's persp-is-current-buffer.  That
predicate, when asked to also consider the "frame global" perspective,
internally does a `with-perspective' round trip: persp-switch to the
global perspective and back, where each switch restores a saved window
configuration, and persp-activate additionally runs
delete-other-windows via persp-reset-windows.  So "is this buffer in
the current perspective?" destroys and rebuilds the frame's window
configuration -- twice.  (I've since fixed my configuration to read
the perspective's buffer list directly, and submitted the same fix to
perspective.el.)

One honest caveat: the capture above is from the menu-update phase,
which as you explained is benign by itself.  The predicate is invoked
from CIDER/sesman in several contexts, and I fixed my configuration
before capturing which in-window-loop entry point invoked it in the
actual crash cycles; candidates present in that setup are mode-line
:eval segments (doom-modeline) and jit-lock.  If the exact real-life
entry point would inform the fix, I can temporarily restore the broken
configuration under the debugger and produce a chronological trace of
adjust_frame_glyphs calls vs. the corrupting store -- the
instrumentation is ready.  The emacs -Q recipe was my attempt to
distill the mechanism without the third-party stack.

> We need something smarter, and perhaps more radical.  Let me think
> about this.

Understood, and agreed on the infloop risk: in the recipe the second
pass happens to stabilize only because the rows array moves just when
the window exceeds its historical maximum height, so a retry
succeeds; Lisp that alternates between two window configurations
would defeat any plain retry scheme.  Happy to test whatever you
settle on -- I can reproduce at will, both with the -Q recipe and
with the original configuration.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 15 Jul 2026 12:52:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 08:52:08 2026
Received: from localhost ([127.0.0.1]:48804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjz5r-0003GP-Bv
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2026 08:52:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50258)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wjz5o-0003Fn-DH
 for 81407 <at> debbugs.gnu.org; Wed, 15 Jul 2026 08:52:05 -0400
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 <eliz@HIDDEN>)
 id 1wjz5i-0000FJ-2u; Wed, 15 Jul 2026 08:51:58 -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=vkQbgAfHouaqRWNjUDIs79FmblpcTgnECGmRrzMxCA8=; b=DdRGd0qUh1we
 +WmNN9s2dGszGrSmO7TAlKAnGIN3EzueNayiy+Og/xrXZ5qYQOhBBhzDPtvc4Lvw//ws8ki3RmT8Q
 QIcXtdFj+DkE6asqepp4Ab6dU5w3lHilY20oNVddWvdE/cqCT7EACocJmwBo1bRr+inzjXUFYIpW0
 izRLuyxV8+0/XHON5R8nNqCPBum2XTuNAal5Zixa3rowF2ozcchHl1C6iWn79SFrn9dsHf1orKwqa
 TX96AII0yTOrIbimJlnEm3u/8UXRMt2zE4j44O2yBYu+vyLrKl8VoIXW97fzJD+mHk1jlQAE0VFPZ
 FtCij6AbKTUeX+24mvFc4A==;
Date: Wed, 15 Jul 2026 15:51:53 +0300
Message-Id: <86ldbc2z6e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Aaron Iba <ai@HIDDEN>
In-Reply-To: <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
 (message from Aaron Iba on Tue, 14 Jul 2026 13:07:27 -0400)
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
 <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Aaron Iba <ai@HIDDEN>
> Date: Tue, 14 Jul 2026 13:07:27 -0400
> Cc: 81407 <at> debbugs.gnu.org
> 
> > Please show a backtrace when the above line computes a bogus value of
> > cursor's vpos.  set_cursor_from_row is called from many places, and
> > it's important to know which one(s) cause this.
> 
> It is display_line's own call at the end of the function ("Maybe set
> the cursor", xdisp.c ~26838), with MATRIX = it->w->desired_matrix.
> Full backtrace from the conditional breakpoint on the vpos store:
> 
>   * frame #0: Emacs`set_cursor_from_row + 3676   ; str w8,[x28,#0x19c]
>     frame #1: Emacs`display_line + 9740
>     frame #2: Emacs`try_window + 200
>     frame #3: Emacs`redisplay_window + 10932
>     frame #4: Emacs`redisplay_window_0 + 44
>     frame #5: Emacs`internal_condition_case_1 + 100
>     frame #6: Emacs`redisplay_windows + 156
>     frame #7: Emacs`redisplay_windows + 128
>     frame #8: Emacs`redisplay_internal + 5120
>     frame #9: Emacs`read_char + 2148
>     frame #10: Emacs`read_key_sequence + 1200
>     frame #11: Emacs`command_loop_1 + 708
>     ...
> 
> At that stop, ROW (= display_line's local `row', i.e. it->glyph_row)
> was 0x780344308 while matrix->rows was 0x78034e000 -- ROW pointed into
> a freed rows allocation.  So this is not reuse of a stale
> current_matrix: the enabled_p protection never enters the picture,
> because the dangling pointers are the desired-matrix row pointers held
> by the *running* try_window/display_line iteration (it->glyph_row and
> friends).  Depending on where the reallocation lands within the line
> loop, the same corruption instead crashes while writing glyphs through
> the stale row:
> 
>   * frame #0: Emacs`gui_produce_glyphs + 6656
>     frame #1: Emacs`display_line + 1312
>     frame #2: Emacs`try_window + 200
>     frame #3: Emacs`redisplay_window + 10932
>     ...

Thanks, now this begins to make sense.

> > It would be very useful if you could provide a reproducible recipe
> > starting from "emacs -Q" and without loading any packages that
> > aren't part of Emacs.
> 
> Done -- recipe below.

Thanks.

> > My reading of the code is that where redisplay_internal calls
> > prepare_menu_bars, redisplay didn't yet start [...] So it is not
> > clear to me what exactly should we "restart" here.
> 
> You are right about prepare_menu_bars, and I withdraw that part of my
> suggestion: matrix reallocation from the menu-update phase is benign
> on its own, and my instrumented traces confirm reallocations from
> update_menu_bar happen before the window loop.  In my original
> configuration the same window-configuration change was reachable
> through more than one path, and the one that corrupts is the
> fontification path (or anything else evaluated from within the window
> loop).  The -Q recipe demonstrates that path with no third-party code.

Is that what the original code you found in your real-life use case
does -- calls delete-other-windows from a function in
fontification-functions?  If not, what does it do, exactly?

> Given that, a possible shape for the real fix: after
> handle_fontified_prop returns (it already anticipates that
> fontification can change things), also detect that the window's
> desired matrix was adjusted -- e.g. compare w->desired_matrix->rows
> against the value captured when the window's redisplay started, or
> bump a generation counter in adjust_glyph_matrix -- and abort
> try_window with the same kind of retry that fonts_changed gets.

Thanks, but I'm not sure this is the correct fix.  First, the callers
of display_line not always return right away when f->fonts_changed
flag is set.  Moreover, this flag can be masked if try_window is
called with a specific value of FLAGS.  More importantly, what to do
after aborting the display_line call?  Restarting redisplay, which is
what we do in other cases of the fonts_changed flag set, is not
necessarily TRT, because depending on what the "evil Lisp" does, it
could do that again and again, in which case we have a redisplay
infloop (which will lock up Emacs).

We need something smarter, and perhaps more radical.  Let me think
about this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 15 Jul 2026 04:17:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 00:17:16 2026
Received: from localhost ([127.0.0.1]:46010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjr3X-0005U9-N7
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2026 00:17:16 -0400
Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:47117)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ai@HIDDEN>) id 1wjgbj-0008G6-Hg
 for 81407 <at> debbugs.gnu.org; Tue, 14 Jul 2026 13:07:52 -0400
Received: by mail-lf1-x12f.google.com with SMTP id
 2adb3069b0e04-5b01cb18515so4266125e87.2
 for <81407 <at> debbugs.gnu.org>; Tue, 14 Jul 2026 10:07:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1784048861; cv=none;
 d=google.com; s=arc-20260327;
 b=If8ByDyd3ETNu8fFHWw3MkiQuRlRW7w/Tpdp0dIEaZ8yTVR39SIdtoIx/GPE3P6UbB
 j4yII6HGUJ1fQ519Obl0KDehYQC5+i2f7CviJKPbarex6Y5mm5va3zSTQ0XIOYFoLZtH
 HITW3NCeeNXO13qkW7hWgfYItkSeaX4Fe8WX2FW9d3wVzb0zaXncAZLUwKlHbf8ko7bs
 z6C4Wjby2QazdWI1hsALXFlsAPZm8TW2IM+2wWC+lkIFH0s/2GGGHL+1hENFUx2bP2UP
 vnWOMliQwoHEEEDbelwYytiSI73TsNNQEm9Y6ldpc6KeLU8lgfbdAuxB4yPlN7tqpjUF
 tbSw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20260327; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:dkim-signature;
 bh=ypoP/5pW8mFSu6IaXnvUS43rJT5o389IsXrEvO4xMlQ=;
 fh=E1mpT6rvccdR4r/KFkbsjcsUW8fJe6FkaoIi2mehYwI=;
 b=NXsmFlK7TLzRhmRvTUbNFMJSiLcuA7ezMAB32k3zHkvOXr18SBMMvxmPMeLtlNaLBK
 Z2jq3ot+VJoxLJuLr5CRhWR1cGFXkvJjaQ+D5EEON6UJaZRiLAT79SAj/eDUDPM5Yz/w
 aB7rOmSTJYHRUzOZXvq7uXBQCUp9/WVPSUwhw7Kzzikgbril4MH6tpYKC4KgDwaiIjIX
 p6aVH0XKS0EFhXhk6gOhWWnZPgaOf+27b2v7lb70qGWe94HoOWmnNkinC59zmFCNQxSz
 AcGVZvacB+3huo3Kr/xCbo+ZGsivlVSOiWZv+jEH8HpocOi/jY2o353GZESJ7oMY0SHr
 gK2Q==; darn=debbugs.gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=aaroniba.net; s=google; t=1784048861; x=1784653661; darn=debbugs.gnu.org;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=ypoP/5pW8mFSu6IaXnvUS43rJT5o389IsXrEvO4xMlQ=;
 b=h7cmI9cYzADynPubwWdqgv/HCPx3mU3xsmLx9Nm+Vfb2hJJgVRWQgThNx+Rqk7PIBu
 Ixa0s0iY0245ASTvCtVi41p8TVEfh9rJOEKBQsJrtOtB1W+nzFJmHCBgFStxL/bdkc0v
 ssIpVplog/ncMIfSOgYP0jV3ytoeYhmDlwCNtgVarLV4HY46CjF6jJbzm6F44XdTZC6y
 ZP9wdLapH5Ijv3pHXwiazHh9F0DlIYsjMh79l9ce9z+UOmwh1IjF8pmANC9nLxh0neg3
 t9MtlnubQ/BOqNRqV6M5f7kqMhBMQ0wI23yDunSNVredJl6q+NmEbzQtAmSLZBnRNKKn
 2MXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1784048861; x=1784653661;
 h=content-type:cc:to:subject:message-id:date:from:in-reply-to
 :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to:content-type;
 bh=ypoP/5pW8mFSu6IaXnvUS43rJT5o389IsXrEvO4xMlQ=;
 b=Yc6aXHfzl2+AqFhgx7TSTZWUb8yTnM9PZj6p6mBrIMSwQLNVzIdrAqdt3b+Xlw3HfH
 dnpYxa4sx07xJUgTkXTL0JEJ02Am1NnhmVtOo1ST2O9z2AjjBGqKu43gWppNuQZO7/D6
 MWLQ1Y+mtByDh+4QuGb5x6Dfzl1ivaH4/7HNYFFHB1TWeZob8V5JfLRTdQS0wJNpU7PD
 2N1kMm2FS0FKRwgKPtl625pECblmImkDNTOmJRct5LnQTklsADSPZCoTyalkQkGLk0sX
 +Uxl04jsw6+fUz96UOox4rb4ow8cO+zFhm1XR73fyp4hGBjiJlJ2+I16a6DgO8jo1AdC
 zKhA==
X-Gm-Message-State: AOJu0Yy0FoBcA5kT/DMFIAU9uot4XDkzTanFhfDvYEpabtK87XSGcVSt
 2ai58HKF3reuXHiu8iBUfexPBFzSczgppPphT9tRLOOcvdYq27hecr+qm/mbqq4RJwkXIRjAWYO
 8h0gDqiastefmsrZoQI5aHZKUJdXv5Fq/++ziejzWCDxHBGcSvbYM2Q==
X-Gm-Gg: AfdE7cnauJ2HcmpKm0HCINqgxhje1hHXJxhoQDyjNKguUfHeWimSL7jOQJo9eRFNUpU
 YhLLo0sPJgQTpftlu1Se0S6VXUIE7DTEEyfT5D6q6W8sAgO4nJWxCs2RXYlWy9dpD0M5Ncv8NzI
 0cvi/haK3CUqDzJbCsqhcqweUyzZ0D1jCXTyTcfR7Al/6P/pQWQY01jiSaTQI67XW/1yh7QB6sH
 EkFRCP9BUb3pW7F9UkkNsjAnM3Dhqo31g8mAv18Ab+9ilQ2PUlMaEiIKmvBrZP8qthCxD/WN8qV
 FR+9e9LqVdqK8ptGpRj9L4lOCfw19A==
X-Received: by 2002:a05:6512:3da7:b0:5ae:c34c:aefe with SMTP id
 2adb3069b0e04-5b159b8fd19mr668747e87.62.1784048860576; Tue, 14 Jul 2026
 10:07:40 -0700 (PDT)
MIME-Version: 1.0
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 <865x2hg2fi.fsf@HIDDEN>
In-Reply-To: <865x2hg2fi.fsf@HIDDEN>
From: Aaron Iba <ai@HIDDEN>
Date: Tue, 14 Jul 2026 13:07:27 -0400
X-Gm-Features: AUfX_my5r2BwUvswiHzPvG95VE_Yhd2O4dwTySxYtVHU2tZD8ai1dKPCFTaTVxM
Message-ID: <CAH_c0bf0VhXMURra2MBdkpUnAbNZi-nAoLFBY44gB_+sbgqd=Q@HIDDEN>
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row after
 window-config change from menu-bar :enable eval during redisplay
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81407
X-Mailman-Approved-At: Wed, 15 Jul 2026 00:16:47 -0400
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Please show a backtrace when the above line computes a bogus value of
> cursor's vpos.  set_cursor_from_row is called from many places, and
> it's important to know which one(s) cause this.

It is display_line's own call at the end of the function ("Maybe set
the cursor", xdisp.c ~26838), with MATRIX = it->w->desired_matrix.
Full backtrace from the conditional breakpoint on the vpos store:

  * frame #0: Emacs`set_cursor_from_row + 3676   ; str w8,[x28,#0x19c]
    frame #1: Emacs`display_line + 9740
    frame #2: Emacs`try_window + 200
    frame #3: Emacs`redisplay_window + 10932
    frame #4: Emacs`redisplay_window_0 + 44
    frame #5: Emacs`internal_condition_case_1 + 100
    frame #6: Emacs`redisplay_windows + 156
    frame #7: Emacs`redisplay_windows + 128
    frame #8: Emacs`redisplay_internal + 5120
    frame #9: Emacs`read_char + 2148
    frame #10: Emacs`read_key_sequence + 1200
    frame #11: Emacs`command_loop_1 + 708
    ...

At that stop, ROW (= display_line's local `row', i.e. it->glyph_row)
was 0x780344308 while matrix->rows was 0x78034e000 -- ROW pointed into
a freed rows allocation.  So this is not reuse of a stale
current_matrix: the enabled_p protection never enters the picture,
because the dangling pointers are the desired-matrix row pointers held
by the *running* try_window/display_line iteration (it->glyph_row and
friends).  Depending on where the reallocation lands within the line
loop, the same corruption instead crashes while writing glyphs through
the stale row:

  * frame #0: Emacs`gui_produce_glyphs + 6656
    frame #1: Emacs`display_line + 1312
    frame #2: Emacs`try_window + 200
    frame #3: Emacs`redisplay_window + 10932
    ...

> It would be very useful if you could provide a reproducible recipe
> starting from "emacs -Q" and without loading any packages that
> aren't part of Emacs.

Done -- recipe below.  Your naive attempt failed, I believe, for three
reasons: (1) pre-redisplay-function runs before any window is
redisplayed, so nothing is stale yet, exactly as you said about
prepare_menu_bars; the Lisp has to run from *inside* the window
redisplay loop, and fontification-functions (called via
handle_fontified_prop from display_line) is such a place; (2)
delete-other-windows is a no-op when there is only one window; and
(3), the subtle one: the rows array of a window's desired matrix only
moves when the window becomes TALLER than it has ever been, because
adjust_glyph_matrix reallocates rows only when rows_allocated <
dim.height, and rows_allocated never shrinks.  Width-only changes
(e.g. deleting a side-by-side window) never move the rows array and
never crash.  I verified both negative cases on my machine.

;;; repro-81407.el --- emacs -Q -l repro-81407.el
;; A window that has never been full-height grows to full height
;; mid-redisplay, from Lisp called by display_line via
;; fontification-functions.

(defvar my-armed nil)

(defun my-evil-fontify (pos)
  (put-text-property pos (point-max) 'fontified t)
  (when my-armed
    (setq my-armed nil)
    ;; Grow this window from ~half to full frame height, mid-redisplay.
    (delete-other-windows)))

(defun my-go ()
  (split-window-below)              ; the NEW bottom window: never been tall
  (select-window (next-window))
  (switch-to-buffer (get-buffer-create "*repro*"))
  (dotimes (i 30)
    (insert (format "line %d: the quick brown fox jumps over the lazy
dog\n" i)))
  (goto-char (point-max))           ; point row displayed after trigger rows
  (setq-local fontification-functions '(my-evil-fontify))
  (run-at-time
   0.5 nil
   (lambda ()
     (with-current-buffer "*repro*"
       (put-text-property (point-min) (point-max) 'fontified nil))
     (setq my-armed t)
     (redisplay t)
     (kill-emacs 0))))              ; only reached if we survived

(add-hook 'window-setup-hook #'my-go)
;;; end

On my machine (macOS 26.5, NS build, arm64) this crashes in roughly
half the runs -- whether it crashes or corrupts silently depends on
whether the freed rows block is still accessible, so a couple of
attempts may be needed; under a debugger it crashed on the first try.
On GNU/Linux, MALLOC_PERTURB_ (or valgrind) should make it
deterministic.  I have five crash reports from this recipe, all
SIGSEGV in gui_produce_glyphs <- display_line <- try_window.  I have
not tested on other platforms, but nothing in the mechanism looks
macOS-specific except the malloc behavior.

> My reading of the code is that where redisplay_internal calls
> prepare_menu_bars, redisplay didn't yet start [...] So it is not
> clear to me what exactly should we "restart" here.

You are right about prepare_menu_bars, and I withdraw that part of my
suggestion: matrix reallocation from the menu-update phase is benign
on its own, and my instrumented traces confirm reallocations from
update_menu_bar happen before the window loop.  In my original
configuration the same window-configuration change was reachable
through more than one path, and the one that corrupts is the
fontification path (or anything else evaluated from within the window
loop).  The -Q recipe demonstrates that path with no third-party code.

Given that, a possible shape for the real fix: after
handle_fontified_prop returns (it already anticipates that
fontification can change things), also detect that the window's
desired matrix was adjusted -- e.g. compare w->desired_matrix->rows
against the value captured when the window's redisplay started, or
bump a generation counter in adjust_glyph_matrix -- and abort
try_window with the same kind of retry that fonts_changed gets.  The
cvpos upper-bound check would then be defense-in-depth only, as you
say.

Happy to test patches; I can reproduce at will.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Jul 2026 12:59:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 14 08:59:32 2026
Received: from localhost ([127.0.0.1]:39964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjcjU-0001RK-2S
	for submit <at> debbugs.gnu.org; Tue, 14 Jul 2026 08:59:32 -0400
Received: from flow-a5-smtp.messagingengine.com ([103.168.172.140]:36149)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wjcjR-0001R7-Uq
 for 81407 <at> debbugs.gnu.org; Tue, 14 Jul 2026 08:59:30 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailflow.phl.internal (Postfix) with ESMTP id 97ED013802CE;
 Tue, 14 Jul 2026 08:59:24 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Tue, 14 Jul 2026 08:59:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:subject
 :subject:to:to; s=fm1; t=1784033964; x=1784041164; bh=zWN2/WP8ih
 qrXjxYy6qh2uipKVboOD1arAFB/pr1QUU=; b=muEhJL9Og1hoyklE5zAVINlme5
 OwwIzgOFLuq6E1X22/ed5LNnLBqNXy0SRDBI2ZhD7IPOzkLU4KiOOYDBw+BjGp0p
 gpzmyZugwAjgCYq/gKzFSXRqsey+npi9j/tx4jxEj+UUCF6w9TKjBev4nkf4hjAG
 Y9SQ9oXqXW/N3vHmV0JCgW4I7cmEQhdIRN+uYB1GmRVJcYJBAht+3Po0OZS+0WDH
 ZLkTzAH/KVfn2vb2XphZax3QulklkToqpnZf+x/bbVoShrEuN1+P7YybudHsTUhV
 VYdKEX2kvtX5zfjmLN0bo7ZYr9JHCuLGADVwRXl3RFCG0rNeKaAEOxmvVWtw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1784033964; x=1784041164; bh=zWN2/WP8ihqrXjxYy6qh2uipKVboOD1arAF
 B/pr1QUU=; b=WDqElb4R+KJoI0Yuizo1FeTHfnRYVjzAENb+58qquV6ywotdlen
 xrc0t39LpduoxpXVksoILqgqAO7QdYKUM9gX84yY5y4pZ8qFPC0KjL4MNJtkQwyO
 +gkn9T2YGerr6toSIaAkA9usaaKmejfYwImx3ptQit9DN9Gu3Y1GAxoysAycvrvw
 1R4QXT/Xj+rmiA0q3E+pVaXKocQTLeVInt3dEl0GOAo1mRrki4Q2afjthgsciMIb
 lQvfwq4JJ+obPLRgFN2Oz3fWh0hIl0NrTiRSCBS+dSmjwx4WKRWxjpMa3nh+jH38
 34xv5YcDUfZqOKlew5zUQ6j48SBFbbr5y2Q==
X-ME-Sender: <xms:rDJWak7QCqzRjsJK2-H8gUlZZO8rMHAXAO80TrRKxUwgr5P21kFiZg>
 <xme:rDJWar5kPHxrNX5OEuBSLR-Xug0lrugpYpZT6Jl5_n8cxdATZykMgAz6kf541eLhw
 SK63FMEYFbuX9YLJn0hlz4CchX4uNya8pTQxAtdPTnS42CFrYQYc_c>
X-ME-Received: <xmr:rDJWahGPqv-sAvoAmNetmL0KNQt1R-SkFNWwbolKQolszYa0u81PDGRXVlkCxHfwpm-kA8V0cfoy>
X-ME-Proxy-Cause: dmFkZTE7q9K1uzLRsLWcFghktPGOeQ4d8xx6UEM9A8qEz+xdW1oA5vsJZFy4ZDYGM4zM8F
 uelAdEdricbppsrr8zX832z1LjM3MU1vSZ5jG1yXDUyQ9qSPBj6z6e9UpL86WWdi3gAz1n
 iwwfZdJFah4m4N/vEuU2tXQfF3AYfqQeJTmJx09jnkXR0/ShF+b/6G0nqP2D1fMVRjiy7T
 fyowWBLx1nDq+2Ggp11EjJdtPipm9A5BLAMeWVRgie2KHkqydWkvrXVlUkVgnzGVl37k+B
 jOml20G+I8EZdgSgybIjO+83j/q870310UDl4ceyiQrtkCYcTjYaJwdvwAuA0czzCiyRGz
 f+qi12sRe2G783g05+PQZ/FeCSInpo5krar9+R/IKbCp5dOh1/dWcHt8uSQyuCVr0TjRhW
 oqW15GpmU9dvkdQ/sRKFAH8Sn8TMDUnfqQ7p9XJE0T5XHZGUFLcyQX2+4ZZZ7b6e7axgDL
 HSPBUKbE0PxZJ36zYMaPz+LDdHYmzMjYW5arN7dyPuxM+UaTXtrbNjxlCfTMdpiaZ637wS
 MJ3QiObMoYTbORFhf7mEjKfxTjvg2kknEt6QMHplBkgaOEgGjb1m4AqnG2NV128BDuLER/
 wqCeroRTVDvmu36wkRAsz6DuKRu3NwZYqa7agZgQg9AVTvy435bxVbMvlBAg
X-ME-Proxy: <xmx:rDJWakR5ruHI5XNLfxaq5681WS2vhbSTRAkn5CxtH204b4wuyV0w5A>
 <xmx:rDJWaqs3s4T0Tw3X6i4YJT9VN1tYU-DCqEMtgCp3Qpd9HSXAA6mmnQ>
 <xmx:rDJWajxBjr1tL-2HhDpZehAAAX_hyYsek9QW4lgq4-wQskHTcDYstQ>
 <xmx:rDJWak5hEovQp_sZdpvL81qeN62dSO4xwMYl8SQJL2GHJjTEyGergA>
 <xmx:rDJWaj7vF8jksH3zUVe0LJ-xiUFJwIxY-YHhv-swczg7UALjGGj7A_Yf>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 14 Jul 2026 08:59:24 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 6C1437E8099; Tue, 14 Jul 2026 13:59:23 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Aaron Iba <ai@HIDDEN>, 81407 <at> debbugs.gnu.org
Subject: Re: bug#81407: 31.0.90; Crash in display_line: stale glyph_row
 after window-config change from menu-bar :enable eval during redisplay
In-Reply-To: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
Date: Tue, 14 Jul 2026 13:59:23 +0100
Message-ID: <878q7dd8wk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81407
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Aaron Iba [13/Jul  9:20pm -04] wrote:
> Emacs 31.0.90 pretest crashes reproducibly in redisplay on macOS. I
> debugged it to completion under lldb, including catching the corrupting
> store live and backtracing the root-cause event. Full analysis below.
>
> Build: emacs-plus@31 (Homebrew tap d12frosted/emacs-plus), built
> 2026-07-01 from the emacs-31 branch, NS build, aarch64 (Apple Silicon),
> native-comp enabled, macOS 26.5.2.

Reading your report, I think that this isn't really a macOS specific,
problem, right?  That's just the platform you are using?

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at 81407 <at> debbugs.gnu.org:


Received: (at 81407) by debbugs.gnu.org; 14 Jul 2026 12:51:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 14 08:51:10 2026
Received: from localhost ([127.0.0.1]:39881 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjcbN-0000Td-H8
	for submit <at> debbugs.gnu.org; Tue, 14 Jul 2026 08:51:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51848)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wjcbK-0000T2-Li
 for 81407 <at> debbugs.gnu.org; Tue, 14 Jul 2026 08:51:07 -0400
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 <eliz@HIDDEN>)
 id 1wjcbF-0000FO-1W; Tue, 14 Jul 2026 08:51:01 -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=Emnan6XNfCc5QmjbQUh1GLBXh0nlcfzZlUM775ExM3g=; b=Dj90aDNB2P/gF7HYJbmH
 lhTVT1Sci3xrS+XxHPNeiBKs2NtRDa3VxiizEZ2Df72jDf+SoLUNXjQ87AHYIOeedOfzpOTs+9DJQ
 0J3o65M10q4s+dtP9I7K6ZnNtpQoXuO0PBSKzbRxkI38dZGBRj7NKgA6fjvTIHuoIi9t0IW+QMRvg
 Wuwmfm3ShhlpmAd7oIXBDwzFq7kCOKGRLvhfqPWP9PGfeFdtNxWkzZszbJxjp8drQWd50uXE59ea2
 lpapI0TfYQKrwATwshhB54DIQg4s1UGeRJqDfkLVUjiAHNt2UXN5jHaJmtgm+OtwlHLTM6U6SOnfN
 31YHPwDO9ZzsiQ==;
Date: Tue, 14 Jul 2026 15:50:57 +0300
Message-Id: <865x2hg2fi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Aaron Iba <ai@HIDDEN>
In-Reply-To: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
 (message from Aaron Iba on Mon, 13 Jul 2026 21:20:01 -0400)
Subject: Re: bug#81407: 31.0.90;
 Crash in display_line: stale glyph_row after window-config change
 from menu-bar :enable eval during redisplay
References: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81407
Cc: 81407 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Aaron Iba <ai@HIDDEN>
> Date: Mon, 13 Jul 2026 21:20:01 -0400
> 
> CRASH MECHANICS (all captured live in lldb)
> 
>   1. The corrupting store, caught by a conditional breakpoint:
> 
>      * stop reason = breakpoint (str w8, [x28, #0x19c])
>        frame #0: Emacs`set_cursor_from_row + 3676
>        frame #1: Emacs`display_line + 9740
>        frame #2: Emacs`try_window + 200
>        frame #3: Emacs`redisplay_window + 10932
>        ...
> 
>      This is xdisp.c: w->cursor.vpos = MATRIX_ROW_VPOS (row, matrix) + dvpos;

Please show a backtrace when the above line computes a bogus value of
cursor's vpos.  set_cursor_from_row is called from many places, and
it's important to know which one(s) cause this.

>      Registers at the stop:
>        value stored (w8)      = 0x4d936441  (1301701697)
>        row (x11)              = 0x780344308
>        matrix (x21)           = 0x77ff1e140
>        matrix->rows           = 0x78034e000   (nrows = 95)
>        w->current_matrix rows = 0x780355000   (nrows = 95)
> 
>      ROW is 40184 bytes BEFORE matrix->rows and belongs to neither the
>      desired nor the current matrix (not even 264-byte aligned against
>      them): it points into a freed rows allocation from before
>      adjust_glyph_matrix reallocated the matrix.  (row - rows)/264 with
>      the negative, non-integral delta yields the huge garbage vpos.

Normally, the call to prepare_menu_bars, which you say is where the
problem starts, is called before the display engine begins
redisplaying windows, and AFAIK the adjust_frame_glyphs calls results
in all the glyph rows of the reallocated current_matrix to be
disabled.  So the following redisplay of the window should disable all
redisplay optimizations and produce all the glyph rows anew.  Thus,
stale current_matrix should not be an issue, as long as we pay
attention to the enabled_p flag of the matrix's rows.  Which is why it
is important to know the caller of set_cursor_from_row in this case.

> REPRODUCTION
> 
>   In my configuration (CIDER + sesman + perspective.el + an advice
>   that filters sesman sessions by perspective): open a Clojure buffer,
>   M-x cider-connect-clj, then type any self-inserting character.
>   Crashes within seconds, 100% reproducible.  Minimal recipe for core:
>   arrange for a menu-bar item's :enable form (or anything else
>   evaluated from update_menu_bar / mode-line eval) to call
>   (delete-other-windows) — or any window-configuration-changing
>   function — while redisplay is in progress.

It would be very useful if you could provide a reproducible recipe
starting from "emacs -Q" and without loading any packages that aren't
part of Emacs.  My naïve attempt to do something similar to what you
describe above, by adding a call to delete-other-windows to
pre-redisplay-function, failed to reproduce the crash, so either it
was too naïve or maybe this only happens on macOS.

>   - After update_menu_bar / prepare_menu_bars runs Lisp, detect
>     window-configuration/matrix changes and restart redisplay rather
>     than continuing with pointers into freed matrices.

My reading of the code is that where redisplay_internal calls
prepare_menu_bars, redisplay didn't yet start, in the sense that we
didn't yet redisplay any windows, and there are no pointers to
current_matrix of any window that redisplay will reuse.  So it is not
clear to me what exactly should we "restart" here.

>   - Defensively: in display_line's "Maybe set the cursor" check
>     cvpos < w->desired_matrix->nrows before MATRIX_ROW, and/or make
>     set_cursor_from_row eassert/clamp when ROW is not inside MATRIX
>     (row < rows || row >= rows + nrows or misaligned).

That's plausible, but it's a band-aid.  We should first try to fix the
root cause of the problem.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jul 2026 07:14:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 14 03:14:26 2026
Received: from localhost ([127.0.0.1]:37976 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wjXLV-0003V6-Is
	for submit <at> debbugs.gnu.org; Tue, 14 Jul 2026 03:14:26 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:38174)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ai@HIDDEN>) id 1wjRou-0004NZ-DT
 for submit <at> debbugs.gnu.org; Mon, 13 Jul 2026 21:20:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ai@HIDDEN>) id 1wjRoo-0004Ft-Ab
 for bug-gnu-emacs@HIDDEN; Mon, 13 Jul 2026 21:20:18 -0400
Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ai@HIDDEN>) id 1wjRom-0005Zr-4e
 for bug-gnu-emacs@HIDDEN; Mon, 13 Jul 2026 21:20:17 -0400
Received: by mail-lf1-x132.google.com with SMTP id
 2adb3069b0e04-5aebc8cb5bcso2578185e87.2
 for <bug-gnu-emacs@HIDDEN>; Mon, 13 Jul 2026 18:20:15 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1783992013; cv=none;
 d=google.com; s=arc-20260327;
 b=ePgzSGhRSx8Fb2qXquynUoOFJiVV1MLOuZ5G4afW7h/qItND2Zst6zDAresaC+IoFq
 o0M60ZOGcXDOuP6LwsvjsQB/A7hEk4xKqE29H6nkaZlDukfobqT2j86AcRM2TITAZQOd
 vADgNChFLX8PQokSjrvSeuOYJybrsVj0FZYLDovCSSLA16xlGZsCxL5exdn0CstYldL2
 1a6KWHBYgTaaSdO86QIz0HFL1UwYroU63h6Mfz4XDc7JefFE4r56UDcIo1U+BiJzOdFb
 QeqyEVp3jR8xnFR+zin91XqUFxMgO9f4nSc4k/+SxS+fOwqV6yz1oDTRLxcWgwvstriM
 uonA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20260327; 
 h=content-transfer-encoding:to:subject:message-id:date:from
 :mime-version:dkim-signature;
 bh=b5XHNFAAmDYD6ec/2Rf75BtkGgkVMFYPpKrtJsYCqLY=;
 fh=+R8aXOFVnuBbN1nRXJJI02Ia//JUQJmLW/Uk/VaA0ag=;
 b=ZgzGafiupqNKFoVueYu1q5s+/Zqsm+9Sgx+6y7RngCvxlgOu0+rNQUfm4miI1nChHT
 7vQs0l3KlcRoqeX9bsMJqkqIn5JOQ6hje+PtJDFCLEnmbHgltogmZqJU//kdUvgqnhpq
 SFJ7jYMZDvu+GSy2nX5JaMdnIpocML+MmjdUMFFD4q+toj/9nz5iFbUikZs26BlYUHpb
 2nYFVFMWtFLc2MReToRT4thDpszL31KpHPKWHVo0X3RydNaRsvPzTUMekLiOCv6j0GQG
 uotwB1FH4AQw3sFqbweErYQNIOI9uW7dH+dINhw75HxffzlsesovaVPEobIXBb5AvUDt
 Zz/g==; darn=gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=aaroniba.net; s=google; t=1783992013; x=1784596813; darn=gnu.org;
 h=content-transfer-encoding:content-type:to:subject:message-id:date
 :from:mime-version:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=b5XHNFAAmDYD6ec/2Rf75BtkGgkVMFYPpKrtJsYCqLY=;
 b=C3zEtZ28ISBjV3UuxremmoM6GsfX9NT6qTJ2hd/slX++/hKg0qycCFUEl+apwHWq33
 qTydWQLsml1X192NMsspSEJz51uq0/0B4rBWCKcX9SJ7zTlHUBYU/JMVhIkncRQrfx/z
 rVtIIIvehdnTvNmCTtD5/Gw+USVOPI5BT6qKrClI9Bt3XBPdm9YLp2rNPbaSAlXzSHex
 rEIVupwEFBwPyxLuc7a1Kcy6+Nv+E47JfQXvOHkbPhj39iWdJItpfBEH7KDf9v2rjxrj
 jZRl92K06M8e6TXcgtcthXZkwLMQQRII5wpm/yDvscMvjK75ANSGGcANw9mkFrPCY8Wf
 bzhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1783992013; x=1784596813;
 h=content-transfer-encoding:content-type:to:subject:message-id:date
 :from:mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to:content-type;
 bh=b5XHNFAAmDYD6ec/2Rf75BtkGgkVMFYPpKrtJsYCqLY=;
 b=cgTT/vKOP4oejclgG5Mkz009O32pEri0GMuMmwdHXjFbZRh5ggpotHF9EwNJ+fUQPu
 m1CORDmv3syG3dpIEQsPvr8EJpL0x5TAgsMductq2xhXSn7qab/kFyqYmCYSomBaXZh7
 AT4fWZ5r1NYZeDfTT8yTqo/6c/HGwjGyHEhGDtT9jleN73BuAz3n7n86c5bc60O5esF2
 sx1NCBLByxtep6BNHfUsTPqS9k/yhhdu4nqi+1EwFW0NR+OHNUKqvNqvB3j0f9IbnxUW
 RBGExAwHmHFl4v3Giv9kdRJ8wjIoCnhEseK94GcL+aq6PfIVRYOvTNxO2bF/C0lPuPoX
 LUTA==
X-Gm-Message-State: AOJu0YwYk0fL4y0eSckJNOgd3MSaZm27mQuODhTlKqYM0oBaYJqMqqIV
 JfiMX1LNhd+YWY+ZQHc/c6Y8VT+Y5u6R4VdKNKOJEtFsRVtOrY87oIvbWpeQlyGiZz56WIdTCyC
 0It5W5Up1eIRiPQhY/v5x5VZD/sXoU6CAp9PWauWlB847BeG1vEpvHw==
X-Gm-Gg: AfdE7clmukdMZv48kBLdwlfuMCOH2sOfys0/bhbdta2zqbUTw6iu+dDs8llGuonmjcS
 268nz2PonlfmMU7WypJ57bs3+zwEf1t+qhSGwU0Nc+wqqOL/T+xbgO3Czc3jBjQlHk9UcfJ9F+E
 3LaKRls9gvLSRjClm/KAWO0ZQKCu8RpySYJGydvBTo9agvfGJl46pTXfc1Pw4WahfZ25QY/U+28
 B0CFYqOJaMOnVkPH81iietnwrCZYsmmg/2QMS2e+l6pZMB8kbY05l03MIvc0h+M6xOQgGhH73hR
 O9t9bxQMYTjm3NN1flU75L91L3gg8sF3FOUnKOfm
X-Received: by 2002:a05:6512:1094:b0:5ae:b713:f26d with SMTP id
 2adb3069b0e04-5b0236bfa48mr2423501e87.58.1783992013094; Mon, 13 Jul 2026
 18:20:13 -0700 (PDT)
MIME-Version: 1.0
From: Aaron Iba <ai@HIDDEN>
Date: Mon, 13 Jul 2026 21:20:01 -0400
X-Gm-Features: AUfX_myOBcEjiPuFCAgbcUIBv7KqeuMX7zhfKQ4y-De1ogl2-wvYUFTF4EY8cQU
Message-ID: <CAH_c0bczVJoqNthKnZD-rMEG8Zx0n6dpfgRcc8GjqSftVho3AQ@HIDDEN>
Subject: 31.0.90; Crash in display_line: stale glyph_row after window-config
 change from menu-bar :enable eval during redisplay
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::132;
 envelope-from=ai@HIDDEN; helo=mail-lf1-x132.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 14 Jul 2026 03:14:24 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Emacs 31.0.90 pretest crashes reproducibly in redisplay on macOS. I
debugged it to completion under lldb, including catching the corrupting
store live and backtracing the root-cause event. Full analysis below.

Build: emacs-plus@31 (Homebrew tap d12frosted/emacs-plus), built
2026-07-01 from the emacs-31 branch, NS build, aarch64 (Apple Silicon),
native-comp enabled, macOS 26.5.2.

SUMMARY

  If Lisp evaluated during redisplay changes the window configuration,
  redisplay continues with a stale glyph_row pointer and either crashes
  immediately or poisons w->cursor.vpos with a huge garbage value that
  crashes the next redisplay.  In my case the Lisp is reached through
  update_menu_bar: a menu-bar item's :enable form (CIDER's
  (cider-connected-p)) ends up =E2=80=94 through sesman and perspective.el =
=E2=80=94
  calling delete-other-windows, which calls adjust_frame_glyphs and
  reallocates the window's glyph matrices mid-redisplay.

  Rude Lisp, certainly (I have fixed my configuration), but Lisp should
  not be able to segfault Emacs, and menu-bar :enable forms are
  evaluated inside redisplay by design.

CRASH MECHANICS (all captured live in lldb)

  1. The corrupting store, caught by a conditional breakpoint:

     * stop reason =3D breakpoint (str w8, [x28, #0x19c])
       frame #0: Emacs`set_cursor_from_row + 3676
       frame #1: Emacs`display_line + 9740
       frame #2: Emacs`try_window + 200
       frame #3: Emacs`redisplay_window + 10932
       ...

     This is xdisp.c: w->cursor.vpos =3D MATRIX_ROW_VPOS (row, matrix) + dv=
pos;

     Registers at the stop:
       value stored (w8)      =3D 0x4d936441  (1301701697)
       row (x11)              =3D 0x780344308
       matrix (x21)           =3D 0x77ff1e140
       matrix->rows           =3D 0x78034e000   (nrows =3D 95)
       w->current_matrix rows =3D 0x780355000   (nrows =3D 95)

     ROW is 40184 bytes BEFORE matrix->rows and belongs to neither the
     desired nor the current matrix (not even 264-byte aligned against
     them): it points into a freed rows allocation from before
     adjust_glyph_matrix reallocated the matrix.  (row - rows)/264 with
     the negative, non-integral delta yields the huge garbage vpos.

  2. The garbage vpos then crashes the *next* display_line at the end
     of display_line ("Maybe set the cursor", xdisp.c ~26823):

       cvpos =3D it->w->cursor.vpos;
       if ((cvpos < 0
            || (it->bidi_p
                && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p=
))

     cvpos is only checked for < 0; the garbage positive index reads
     ~340 GB past the rows array:

       ldr    w9, [x8, #0x19c]     ; cvpos =3D 0x4d936441
       tbnz   w9, #0x1f, skip      ; only lower-bound check
       ldr    x8, [x8, #0xe8]      ; w->desired_matrix
       ldr    x8, [x8, #0x8]       ; matrix->rows
       umaddl x8, w9, w10, x8      ; rows + cvpos*264
       ldrb   w8, [x8, #0xf5]      ; ends_at_zv_p -> EXC_BAD_ACCESS

     All crash addresses across 10+ observed crashes decode as
     stale_row + k*264 + 0x50_0000_0000-style truncation artifacts of
     this arithmetic, confirming a single root cause.  A second
     signature (SIGSEGV at 0x30 inside the face-lookup call in
     extend_face_to_end_of_line) comes from the same corrupted state.

  3. The root-cause event, caught with a breakpoint on
     adjust_glyph_matrix conditioned on this window's matrices, WHILE
     redisplay_internal was on the stack:

       adjust_glyph_matrix
       allocate_matrices_for_window_redisplay
       adjust_frame_glyphs
       Fdelete_other_windows_internal
       ... (elisp, native-compiled) ...
       delete-other-windows
       persp-reset-windows          ; perspective.el
       persp-activate
       persp-switch
       persp-current-buffers*
       persp-is-current-buffer
       ... (seq-filter over sesman sessions) ...
       sesman-current-session       ; sesman
       cider-repls                  ; CIDER
       cider-current-repl
       cider-connected-p            ; menu-bar :enable form
       eval_sub / Feval
       internal_condition_case_1
       menu_item_eval_property      <-- Lisp evaluated by redisplay
       parse_menu_item
       menu_bar_item
       map_keymap_internal
       map_keymap_canonical
       menu_bar_items
       update_menu_bar
       redisplay_internal           <-- redisplay in progress
       redisplay_preserve_echo_area
       sit_for / read_char / command_loop

     (perspective.el's persp-is-current-buffer with INCLUDE-GLOBAL
     round-trips through `with-perspective`, which does two real
     persp-switch calls, each restoring a window configuration =E2=80=94 a
     side effect buried inside what callers use as a pure predicate.)

REPRODUCTION

  In my configuration (CIDER + sesman + perspective.el + an advice
  that filters sesman sessions by perspective): open a Clojure buffer,
  M-x cider-connect-clj, then type any self-inserting character.
  Crashes within seconds, 100% reproducible.  Minimal recipe for core:
  arrange for a menu-bar item's :enable form (or anything else
  evaluated from update_menu_bar / mode-line eval) to call
  (delete-other-windows) =E2=80=94 or any window-configuration-changing
  function =E2=80=94 while redisplay is in progress.

SUGGESTED HARDENING (either or both)

  - After update_menu_bar / prepare_menu_bars runs Lisp, detect
    window-configuration/matrix changes and restart redisplay rather
    than continuing with pointers into freed matrices.
  - Defensively: in display_line's "Maybe set the cursor" check
    cvpos < w->desired_matrix->nrows before MATRIX_ROW, and/or make
    set_cursor_from_row eassert/clamp when ROW is not inside MATRIX
    (row < rows || row >=3D rows + nrows or misaligned).

I can reproduce on demand and am happy to test patches.

In GNU Emacs 31.0.90 (build 1, aarch64-apple-darwin25, NS
appkit-2748.00 Version 26.5.2 (Build 25F84)) of 2026-07-01 built on
Homebrew emacs-plus@31.




Acknowledgement sent to Aaron Iba <ai@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#81407; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 16 Aug 2026 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.