From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70385: Crash in note_fringe_highlight Date: Mon, 15 Apr 2024 19:57:44 +0800 Message-ID: <8734rm25zb.fsf@yahoo.com> References: <86h6g49cdv.fsf@mail.linkov.net> <87jzkz1kdn.fsf@yahoo.com> <86r0f6lv76.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29528"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: bjorn.bidar@thaodan.de, juri@linkov.net, 70385@debbugs.gnu.org, vekazanov@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 15 13:59:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rwKzG-0007Rm-RG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Apr 2024 13:59:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwKzC-0007GQ-4c; Mon, 15 Apr 2024 07:58:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwKz5-0007BL-UA for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 07:58:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwKz4-0000Dl-MM for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 07:58:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwKzG-0001L9-9N for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Apr 2024 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70385 X-GNU-PR-Package: emacs Original-Received: via spool by 70385-submit@debbugs.gnu.org id=B70385.17131822984746 (code B ref 70385); Mon, 15 Apr 2024 11:59:02 +0000 Original-Received: (at 70385) by debbugs.gnu.org; 15 Apr 2024 11:58:18 +0000 Original-Received: from localhost ([127.0.0.1]:37047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwKyX-0001EQ-Jz for submit@debbugs.gnu.org; Mon, 15 Apr 2024 07:58:18 -0400 Original-Received: from sonic314-20.consmr.mail.ne1.yahoo.com ([66.163.189.146]:45854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwKyT-0001Cp-Vl for 70385@debbugs.gnu.org; Mon, 15 Apr 2024 07:58:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713182276; bh=oeNwh0MXUHyDfCOm8HALba61vneemUcYNGaTQdPaFvw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=i0f3ZHsO9qszGkuIFvnJQUKqrUuS7zMvloYdbvSRLy6rDOo3Ap9ORQutj0NjTaAmoIxQuODWXyn9hQAAoO9TUzS33A3v8VVHixhy4Zx1jHh0v1Y1/2twyPAduLGTAW9KyjkErKwTeg64v+2gQv7TJqClMWARGUj8raPfFBfF24L95sTl6wwJLmViPUUqwoyLRy0cqcsJoC/GMmY3hBmjoUQvOb2tYcQn0c+xzmRBqAiAbCj7OITNFanGsuy7gLoqmPuPOjpUwX3I241IK586qooIFG2FpWjGvjEurlsFWnetqQffkS4QnPpvi6vd3XDG9ZhpuhlEY6lsH4tnR/3BgQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713182276; bh=zdElNrdgpUGwQvCvruUAKyo9j43UV9zU9C4AzlPG29u=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=NXa2bthcoNb79cQLOrmK5JyYJ78RJBH9FfclACfgBxxE8uG5A8685NqtZF2Lz6C4dwlSAfLdcH1UL5mRspF//t3YijgHAmvSB37VxnlLP14QUxI7es19SZ6mvLh4Hyi+dDL5jvmBPJ/mNmj7p9xsxboUfoJvoTf0xmYOTWyzH2jzbDRoL4OcjYnr4GcDtPao5I4JXQrAu21lD70V/WpzcDay1jpcbhHu3mVdrSWzMIx9wDpHMujpYNq19BTfPPAwm1seAVSr62Stq/sUWXkn0vLM6voTY8Ip6moKCLpmGfFef40bTt1y5hnoEmASFuPP+nkG72frZzaCg8+/8ta45g== X-YMail-OSG: hmbdfUYVM1lVui6uieFwGKE8UIjQrUaIZ4xSm8ehKrQArzbq0EQn3uPZO44s4HZ ffI_4gXjnmahLfE3LPQsiD9GmHaCpbbCa5NFx_LN50H6aaOEvm9kjuHefaf92MTyCSdh81kwMrkN hjCmw5LNDhkCtwflvTqRKLYIzip5MFuu8p_brjGIzax5X4c5am5uMnc0lYSwtULw5Es93NBb2gmT ekTHH9joGUIzZ8x0PAN.mI5_NLS9XDAlkqEGiWFoTHw2x9kriWq3_B9w6qXV4JUyyq5DslR3JfUa z7VA1SO2EhMY6pe7nRB715ZXGU_w3r40aVWm0pwhhHRRtqDlBr2htHo_N7zMP.wr0YiuXUhCYWh8 _DDEWU1_HPAHMalYJBIAB01.PND6G8s8VBCgSaZCA3jfu0p197udbARh8_FYCOEj6r_6owFOa9tw ljDKlQBqt6VCjlNsM9.v7AvJNI61BZMeYgqdGuzzFM3oOhlM71gv2.Bp4QyhaW56.p3gSNhGbbjm MLx_KWM.8OoBEzXFD3WNaDxM_pd.j4vICUk9YDe7tYZNOWaP_2YU2HncTdfhoCCbJJOfd9aXIhk6 9Rg1plVDGMGMEjAheT1O6IJVHNY_ltOjhRHy5txGY3XcDxMlf9RqVng43VfBH9tD1fn5PgVhIJ_Z ZoukLIbnyCVsz78y2zrRgMTNCTrDmd3Hs564oengMPqGw2bPqPefBUR.pWe21dGOMcq35jIEa_w8 TTB9tg.5jPXShpTRfQum8Q9djoG6SRRDADm2u.5rsRwXYoPxTi_pom9fj35soOpq5dHdfcB5cvDW ZrGGO4xdI5D_540WAyTenEGMCYzQ7KQWP0mTsQ7F1V X-Sonic-MF: X-Sonic-ID: e4761416-efec-44dd-a031-b51b8b633744 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Mon, 15 Apr 2024 11:57:56 +0000 Original-Received: by hermes--production-sg3-6f9f87bd85-6gkq8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7c0e2a367cedf0ed9988ac44092f3dae; Mon, 15 Apr 2024 11:57:50 +0000 (UTC) In-Reply-To: <86r0f6lv76.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 15 Apr 2024 14:30:21 +0300") X-Mailer: WebService/1.1.22205 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283364 Archived-At: Eli Zaretskii writes: > Any reason you didn't include w->window_end_valid in the condition, > like we do for mouse-highlight? This wasn't necessary to fix the crash for me. > I'd like in general to have the same conditions, to avoid having > people wonder what they miss when they read this code. Your wish is my command... :-) I suspect it might fix the Bjorn's crash also. Bjorn, please try: diff --git a/src/xdisp.c b/src/xdisp.c index d984c12d1aa..51f6b1efd69 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -35771,9 +35771,10 @@ note_fringe_highlight (struct frame *f, Lisp_Object window, int x, int y, /* Don't access the TEXT_AREA of a row that does not display text, or when the window is outdated. (bug#70385) */ - if (window_outdated (w) - || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, - vpos))) + if ((window_outdated (w) + || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, + vpos))) + && w->window_end_valid) return; /* Get to the first glyph of a text row based on the vertical position