unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-27 41232e6: Avoid crashes due to bidi cache being reset during redisplay
Date: Sun, 31 May 2020 16:24:23 +0000	[thread overview]
Message-ID: <CAOqdjBe33Q_Qpcb85Xjo5+hWUPE9=iO_60fdt3YdKoRgksP6-Q@mail.gmail.com> (raw)
In-Reply-To: <834krwksz2.fsf@gnu.org>

On Sun, May 31, 2020 at 3:46 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Sun, 31 May 2020 15:36:22 +0000

> > Sorry, should have been more explicit: if we run out of memory,
> > memory_full will signal an error, after freeing some "spare" memory.
> > The error handler will call echo_display_area_1. If the bidi iterator
> > is in use, the cache size is much larger than the spare memory we
> > freed, so the allocation will also fail, and I'm not sure we ever
> > recover from that.
> Yes, our code is full of such places.  It would be good to improve the
> recovery in these cases.

I've played around a little, and when resize-mini-windows is nil, it's
quite easy to get into a loop where the OOM message isn't displayed.
Without the patch, recovery sometimes works. Maybe it's just time to
update SPARE_SIZE to reflect the amount of memory the bidi iterator
currently needs.



  parent reply	other threads:[~2020-05-31 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200531142645.22884.78754@vcs0.savannah.gnu.org>
     [not found] ` <20200531142647.08FCA20A2B@vcs0.savannah.gnu.org>
2020-05-31 14:44   ` emacs-27 41232e6: Avoid crashes due to bidi cache being reset during redisplay Pip Cet
2020-05-31 15:12     ` Eli Zaretskii
2020-05-31 15:36       ` Pip Cet
2020-05-31 15:46         ` Eli Zaretskii
2020-05-31 16:07           ` Eli Zaretskii
2020-05-31 16:24           ` Pip Cet [this message]
2020-05-31 16:33             ` 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='CAOqdjBe33Q_Qpcb85Xjo5+hWUPE9=iO_60fdt3YdKoRgksP6-Q@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).