unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: <martin.bruestel@tu-dresden.de>
Cc: 49562@debbugs.gnu.org
Subject: bug#49562: 27.2; Crash with specific mode-line-format in BiDi processing
Date: Wed, 14 Jul 2021 22:10:49 +0300	[thread overview]
Message-ID: <83pmvk7lty.fsf@gnu.org> (raw)
In-Reply-To: <sa6sg0gn90m.fsf@hector.i-did-not-set--mail-host-address--so-tickle-me> (martin.bruestel@tu-dresden.de)

> From: <martin.bruestel@tu-dresden.de>
> 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...





  reply	other threads:[~2021-07-14 19:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 16:40 bug#49562: 27.2; Crash with specific mode-line-format in BiDi processing martin.bruestel
2021-07-14 19:10 ` Eli Zaretskii [this message]
2021-07-15  9:30   ` Martin Brüstel
2021-07-15 10:06     ` Eli Zaretskii
2021-07-18 14:31     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pmvk7lty.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49562@debbugs.gnu.org \
    --cc=martin.bruestel@tu-dresden.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).