1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Avoid crashes due to bidi cache being reset during redisplay

If automatic character composition triggers GC, and
'garbage-collection-messages' are turned on, we could have the
bidi cache reset while processing RTL text, which would then
consistently crash.
* src/xdisp.c (display_echo_area_1): Protect the bidi cache
against changes inside 'try_window'.
This commit is contained in:
Eli Zaretskii 2020-05-31 17:23:11 +03:00
parent f72bb4ce36
commit 41232e6797

View File

@ -11539,7 +11539,9 @@ display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2)
/* Display. */
clear_glyph_matrix (w->desired_matrix);
XSETWINDOW (window, w);
void *itdata = bidi_shelve_cache ();
try_window (window, start, 0);
bidi_unshelve_cache (itdata, false);
return window_height_changed_p;
}