aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-09-28 15:50:29 +0300
committerEli Zaretskii2015-09-28 15:50:29 +0300
commita11ae01df93d32f4881908b1e6f07d6b908fe272 (patch)
tree049c7445df7da4fd978ce76ac435b879e04d3639
parent28ddc850479fbe333903c0c64be1f24798243824 (diff)
downloademacs-a11ae01df93d32f4881908b1e6f07d6b908fe272.tar.gz
emacs-a11ae01df93d32f4881908b1e6f07d6b908fe272.zip
Another attempt to fix crashes due to prematurely freed faces
* src/xdisp.c (redisplay_internal): Inhibit freeing of realized faces for as long as we might have desired matrices that reference those faces. (Bug#21428)
-rw-r--r--src/xdisp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 2c38aa9ccff..863d891c2de 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13383,6 +13383,8 @@ redisplay_internal (void)
13383 pending = false; 13383 pending = false;
13384 forget_escape_and_glyphless_faces (); 13384 forget_escape_and_glyphless_faces ();
13385 13385
13386 inhibit_free_realized_faces = false;
13387
13386 /* If face_change, init_iterator will free all realized faces, which 13388 /* If face_change, init_iterator will free all realized faces, which
13387 includes the faces referenced from current matrices. So, we 13389 includes the faces referenced from current matrices. So, we
13388 can't reuse current matrices in this case. */ 13390 can't reuse current matrices in this case. */
@@ -13871,6 +13873,10 @@ redisplay_internal (void)
13871 if (sf->fonts_changed) 13873 if (sf->fonts_changed)
13872 goto retry; 13874 goto retry;
13873 13875
13876 /* Prevent freeing of realized faces, since desired matrices are
13877 pending that reference the faces we computed and cached. */
13878 inhibit_free_realized_faces = true;
13879
13874 /* Prevent various kinds of signals during display update. 13880 /* Prevent various kinds of signals during display update.
13875 stdio is not robust about handling signals, 13881 stdio is not robust about handling signals,
13876 which can cause an apparent I/O error. */ 13882 which can cause an apparent I/O error. */