From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49562: 27.2; Crash with specific mode-line-format in BiDi processing Date: Wed, 14 Jul 2021 22:10:49 +0300 Message-ID: <83pmvk7lty.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35010"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49562@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 14 21:12:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3kIk-0008xT-4C for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 21:12:10 +0200 Original-Received: from localhost ([::1]:51694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3kIi-0000A6-Dy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 15:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3kIc-00009r-Aj for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 15:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3kIc-0003fc-3T for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 15:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3kIb-00031r-Q3 for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 15:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jul 2021 19:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49562 X-GNU-PR-Package: emacs Original-Received: via spool by 49562-submit@debbugs.gnu.org id=B49562.162628986311574 (code B ref 49562); Wed, 14 Jul 2021 19:12:01 +0000 Original-Received: (at 49562) by debbugs.gnu.org; 14 Jul 2021 19:11:03 +0000 Original-Received: from localhost ([127.0.0.1]:45982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3kHf-00030c-CK for submit@debbugs.gnu.org; Wed, 14 Jul 2021 15:11:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3kHe-000308-3R for 49562@debbugs.gnu.org; Wed, 14 Jul 2021 15:11:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51968) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3kHY-0002jZ-1r; Wed, 14 Jul 2021 15:10:56 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3kHX-0004mf-M7; Wed, 14 Jul 2021 15:10:56 -0400 In-Reply-To: (martin.bruestel@tu-dresden.de) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209970 Archived-At: > From: > Date: Wed, 14 Jul 2021 18:40:57 +0200 > > Emacs crashed when visiting specific pages in a browser using EXWM. > Turns out this was triggered when the buffer was renamed accordingly. > During redisplay, the crash happens for certain strings which are set as > `mode-line-format`. I created an example to reproduce this with a stock > Emacs configuration, see the attached elisp file. For me, this only > triggers when the window is large enough, I suspect smaller windows will > prevent the problematic part of the mode-line-format string to be > processed. > > To reproduce: > > 1. Start Emacs using 'emacs' (not tested with 'emacs -Q') > 2. Maximize Frame > 3. M-x ielm > 4. (load "/path/to/attached/break-emacs.el") > 5. M-x crash-test-mode-line-format > 6. Observe crash The "evil" mode-line string includes invalid use of bidi formatting controls: you have there a U+202A LEFT-TO-RIGHT EMBEDDING without a matching U+202C POP DIRECTIONAL FORMATTING. Removing the former or adding the latter avoids the crash. I will look into avoiding the crash even with the unbalanced control characters. I guess this imbalance triggers a subtle bug somewhere, which is somehow related to the use of (space (:align-to ...)) display spec. Hmm...