emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-27 41232e6: Avoid crashes due to bidi cache being reset during


From: Pip Cet
Subject: Re: emacs-27 41232e6: Avoid crashes due to bidi cache being reset during redisplay
Date: Sun, 31 May 2020 15:36:22 +0000

On Sun, May 31, 2020 at 3:12 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Sun, 31 May 2020 14:44:54 +0000
> > Cc: emacs-diffs@gnu.org
> >
> > > +  void *itdata = bidi_shelve_cache ();
> >
> > But what if we're out of memory? bidi_shelve_cache will call xmalloc...
>
> xmalloc calls memory_full if that happens.

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]