aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-05-31 17:23:11 +0300
committerEli Zaretskii2020-05-31 17:23:11 +0300
commit41232e679732fcd37fc56edda90035d6f98b591f (patch)
tree254f5bb4357132bebcf926d1e6f77f842d237002
parentf72bb4ce36686d814bbb540a7844f22570540bc8 (diff)
downloademacs-41232e679732fcd37fc56edda90035d6f98b591f.tar.gz
emacs-41232e679732fcd37fc56edda90035d6f98b591f.zip
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'.
-rw-r--r--src/xdisp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index bff6218106b..60848f4433e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11539,7 +11539,9 @@ display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2)
11539 /* Display. */ 11539 /* Display. */
11540 clear_glyph_matrix (w->desired_matrix); 11540 clear_glyph_matrix (w->desired_matrix);
11541 XSETWINDOW (window, w); 11541 XSETWINDOW (window, w);
11542 void *itdata = bidi_shelve_cache ();
11542 try_window (window, start, 0); 11543 try_window (window, start, 0);
11544 bidi_unshelve_cache (itdata, false);
11543 11545
11544 return window_height_changed_p; 11546 return window_height_changed_p;
11545} 11547}